feat(libwebrtc): implement webrtc::rtcp::Pli::Parse #15092
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15092"
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 alvaroelpob on 2026-11-02T15:14:00Z.
What
Implements
webrtc::rtcp::Pli::Parse(const CommonHeader&)in libwebrtc, which threw and was declared without parameters.The module's WebRTC revision lies between M127 and M134, as recorded in the debt file.
Pli::ParseandPsfb::ParseCommonFeedbackare the same at M127 branch-heads/6533 and M134 branch-heads/6998.pli.h,psfb.handrtcp_packet.hare identical at both, and M134 only drops the out-of-lineconstexprdefinitions.The function is adapted from
pli.ccandpsfb.ccand lives insrc/RtcpPli.cpp. That file starts with their WebRTC copyright notice and the BSD licence text from WebRTC'sLICENSE.WebRtcRtcpPliis the 16-byte layout ofrtcp_packet.handpsfb.h: the vtable pointer fromRtcpPacket's virtual destructor,sender_ssrc_at 8 andmedia_ssrc_at 12.Pliadds no members.static_asserts check it.Parsetakesthisfirst and theCommonHeader(the existingWebRtcRtcpCommonHeader) second:kCommonFeedbackLength), it returns false and leaves the packet untouched.Gaps, recorded as debt:
RTC_LOG(LS_WARNING)for a short payload; libwebrtc's logging is not implemented, so it is not emitted.RTC_DCHECKs the packet type and format, so, as in a release build, neither is checked.Upstream reads a null packet, a null header, and a null payload of 8 bytes or more, so all three throw. The inventory drops from 352 to 351.
Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.guest_webrtc_rtcp_plitest, on packets filled with 0xA5 and headers fromCommonHeader::Parse:std::invalid_argument.ctest -j16on head 241005be7b: 3533/3533 pass.check_conventions.py --base upstream/mainpasses.pr_overlap.py: no other open PR implementsPli::Parse. The shared lines are the pending-export count indocs/dev/debt/libwebrtc.mdand, with #14224, thetarget_sourceslist inCMakeLists.txt.main096c45570f(after #14087, #14095, #14116, #14120, #14129 and #14148), head b675b4075e, to resolve the conflicts on the sharedCMakeLists.txt,Api.hppand debt-file lines; both sides are kept and the count is 351, the 291 stubs left plus the 60 NID exports. Full build andctest -j16: 3596/3596 pass.check_conventions.py --base upstream/mainpasses.main4f41f4c375, head 4cab30e768, to resolve the conflicts on the sharedCMakeLists.txt,Export.cppand debt-file lines; both sides are kept and the debt count is recomputed fromExport.cpp. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfailed under that load, pass when run alone, andmain4f41f4c375passes all 3799 with-j16on the same machine.check_conventions.py --base upstream/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T15:54:30Z.
Review: APPROVED
Checked against firmware 13.42's own module as well as the upstream source.
libwebrtc.sprx(sha256d59d0caf6967329b39201a2a0bd6df7b994516f21701b9801908db6735ae5314),lgJuzIdaeRUat0x3c64a0, read from disassembly only, not measured on a console:This matches the PR:
payloadSizeis at header+4 andpayloadat +8, as inWebRtcRtcpCommonHeader.WebRtcRtcpPli.Build and test on Windows (WinLibs GCC,
BUILD_TESTING=ON), PR merged into currentmain:guest_webrtc_rtcp_plipasses. Onmainthe export throwsnot implemented.One note, no change needed: the three
invalid_argumentthrows for null arguments are host-side. The module dereferencesrsistraight away, so the console faults there.