feat(libwebrtc): implement webrtc::rtcp::App::Parse and its destructor #17698
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17698"
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 LeandroLP23 on 2026-11-09T10:35:10Z.
What
Implements
webrtc::rtcp::App::Parseand theAppdestructor in libwebrtc, adapted from app.cc andBufferT::SetDatain buffer.h. LikePli::Parse, the WebRTC notice and BSD licence are at the top of the file.app.h,rtcp_packet.handbuffer.hare byte-identical at M127 (e0b28a6a81) and M134 (8d78f5de6c).app.ccdiffers only by two redundant out-of-classconstexprdefinitions.app.hon top ofRtcpPacket. The vtable pointer is at 0,sender_ssrc_at 8,sub_type_at 12 andname_at 16. Thertc::Buffersize, capacity and data pointer are at 24, 32 and 40.operator new[]to the larger of the data size and 1.5 times its capacity, and frees the old block throughoperator delete[]. #16485 does the same forCopyOnWriteBuffer.operator delete[].RTC_LOG(LS_WARNING)messages are not emitted, and the packet type that upstream onlyRTC_DCHECKs is not checked.rtc::Bufferis modelled ininclude/Buffer.hpp, byte-identical to the file #17703 adds, so the two merge cleanly in either order.The
Appconstructor still throws: it would have to install anAppvtable, and the module defines none. Until that exists no title reaches these two exports, as withPli::Parse. The debt entry says so.Nack::Parsewas the obvious companion but is left out. It fills two gueststd::vectors, and the repository has no measured layout for the console'sstd::vector. The console'sstd::stringcarries an extra leading word, so the vector layout cannot be assumed.Tested
Windows 11, MinGW GCC Release build.
guest_webrtc_rtcp_appis new;guest_webrtc_rtcp_pliandguest_webrtc_rtp_extensionstill pass. The new test covers:CommonHeader::Parse.As a negative control, removing the 1.5× headroom fails the test at the capacity-18 check.
tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchcould not merge #14212, #15189 and #17691, so I compared them by hand: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)