feat(libwebrtc): implement RTCP REMB parsing #18798
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18798"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlexWhitehouse on 2026-11-12T10:32:04Z.
What
libwebrtc
webrtc::rtcp::Remb::Parse(const CommonHeader&)(_ZN6webrtc4rtcp4Remb5ParseERKNS0_12CommonHeaderE, NIDQyR2ngto5ow) threwnot implemented. This PR ports it from M134 (8d78f5de)remb.cc, withParseCommonFeedbackfrompsfb.cc. The newsrc/RtcpRemb.cppstarts with both files' notices.remb.ccandremb.hare byte-identical at M127 (e0b28a6a).Layout: a GCC 15 class-layout dump of the real M134
remb.h,psfb.handrtcp_packet.hgives a 48-byte object: the vtable pointer, sender and media SSRCs at 8 and 12, the 64-bit bitrate at 16, and the SSRC vector (begin/end/capacity) at 24.Vector storage: the SSRC list is allocated and freed through guest
operator new/operator delete(_Znwm_nid_postfix/_ZdlPv_nid_postfix), asCopyOnWriteBufferdoes, so a guest destructor can free it.Parse: follows upstream's release behaviour and write order:
REMBidentifier, or a size that doesn't match the SSRC count returns false without changing the object;mantissa << exponentloses bits or is negative as a signed 64-bit value, it returns false, keeping the SSRCs and bitrate already written but leaving the vector untouched, as upstream does;clear()andreserve()do upstream. If that allocation fails, the vector is left empty with its old storage.RTC_DCHECKs and logging don't run in release builds, so they don't throw. A null object, header or payload that would be read throws.Debt: the stub is removed, the libwebrtc unknown-export count drops from 188 to 187 (main's pending count minus one, set in the existing
feat-libwebrtc-rnn-vad.mdfragment that already changes that line), and a debt fragment (docs/dev/debt/changes/feat-libwebrtc-rtcp-remb-parse.md) adds an entry recording the layout and that the console's ABI is unverified.Tested
guest_webrtc_rtcp_remb(core/libs/prx/libwebrtc/tests/RtcpRemb.cpp) covers:main, the test fails with_ZN6webrtc4rtcp4Remb5ParseERKNS0_12CommonHeaderE_nid_postfix not implemented;guest_webrtc_rtcp_remb,guest_webrtc_rtcp_common_header,guest_webrtc_rtcp_pliandpatched_librariespass.guest_webrtctests andpatched_librariespass at c8dcfe5501, with no compiler warnings in the changed files and no loader errors for the guestnew/deleteimports. The branch was then rebased onto currentmain: #17698 (rtcp::App) had added its source, include and test at the same insertion points, so both are kept, and the count was recounted.guest_webrtc_rtcp_rembandpatched_librariespass again on Linux.python3 tools/check_conventions.py --base origin/main: all checks passed.python3 tools/pr_overlap.py: no open PR implements this export.Remb.TransportFeedback), Nack andVideoSinkWantsPRs share the count line. Whichever merges second recounts.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-12T12:00:17Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8e80091923:tools/check_conventions.pypassed;git diff --checkclean.guest_webrtc_rtcp_remb_testsbuilt cleanly.guest_webrtc_rtcp_remb):core/libs/prx/libwebrtc/Export.cpp,core/libs/prx/libwebrtc/include/Api.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Generated withfooter from the description; the AI-assisted checkbox can stay.Looks Good To Me