feat(libwebrtc): implement rtc::SentPacket constructors #16850
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16850"
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-07T18:15:57Z.
What
The two libwebrtc
rtc::SentPacketconstructors threw..._nid_postfix not implemented:_ZN3rtc10SentPacketC1Ell(NIDi+gAZMGguUo):SentPacket(int64_t packet_id, int64_t send_time_ms);_ZN3rtc10SentPacketC1EllRKNS_10PacketInfoE(NIDLzIWcjdQauo): the same, plusconst rtc::PacketInfo&.This PR implements them from
sent_packet.ccandsent_packet.hat M134 (8d78f5de), the revision the other libwebrtc ports cite. The.ccis identical at M127 (e0b28a6a). The newSentPacket.cppstarts with that file's notice.static_asserts inSentPacket.hpp:PacketInfois 40 bytes. Three flags sit at 0, 1 and 2, the 4-byte packet type and protocol enums at 4 and 8,optional<uint16_t> network_idat 12 (the value, then the engaged flag), and the threesize_tsizes at 16, 24 and 32.SentPacketis 56 bytes:packet_idat 0,send_time_msat 8 andinfoat 16. Neither has a vptr.infoas the header's member initialisers do: false flags,kUnknownenums, no network id and zero sizes.PacketInfo, the network id included when it is engaged.is_mediaat offset 2, which is padding in M127. This PR follows M134. The new debt entry records that the console's revision is unknown.The libwebrtc unknown-export count drops from 263 to 261.
Tested
guest_webrtc_sent_packet_defaultandguest_webrtc_sent_packet_copy.main, both fail with_ZN3rtc10SentPacketC1Ell_nid_postfix not implementedand_ZN3rtc10SentPacketC1EllRKNS_10PacketInfoE_nid_postfix not implemented;public_headerspasses.mainatdd4da52a88(with #15609), all 49 libwebrtc tests andpublic_headerspass at2da3bf29e5.packet_idandsend_time_msfails both tests.python3 tools/check_conventions.py --base origin/main: all checks passed.python3 tools/pr_overlap.py --branch feat/libwebrtc-sent-packet: no open PR implementsSentPacket. Its comparison failed closed, because several libwebrtc PRs conflict withmain, so I read their diffs by hand.Export.cpp,Api.hpp,CMakeLists.txtand debt file: #15189, #15197, #15262-#15265, #15270, #15271, #15274-#15277 and #15609, plus my #16381 (RateTracker), #16485 (CopyOnWriteBuffer) and #15766 (VideoFrame).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 gabichuuuuu on 2026-11-07T22:13:32Z.
Review: COMMENTED
Read
9508cc4b9bagainstmain.Both constructors match
sent_packet.ccandsent_packet.hat8d78f5de: member order and defaults, the 40-bytePacketInfoand 56-byteSentPacketoffsets with libc++'sstd::optional<uint16_t>(value at 12, engaged flag at 14), the(long, long)and(long, long, const PacketInfo&)mangled names, and copyingnetwork_idonly when it's engaged. The only M127 differences areabsl::optionalandis_media, which is padding at offset 2 there, so writing it is harmless; the debt entry records this. The new tests can't build onmain, whereWebRtcSentPacketdoesn't exist.Count line. 296 to 294 matches
main(296NotImplemented_nid_no_patchstubs inlibwebrtc/Export.cppat87473937d3), but #16893 changes the same line to 294 too, so whichever merges second should say 292.Not run here; this is from reading the code.
AI-assisted: yes.