feat(libwebrtc): implement VideoFrame width and height #15766
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15766"
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-04T13:33:07Z.
What
Implements libwebrtc
webrtc::VideoFrame::width() const(ZoZkZB0F7vw) andwebrtc::VideoFrame::height() const(8qjTJRqcnn0), which threw throughNotImplemented_nid_no_patch.Source:
api/video/video_frame.ccat M134 (lines 327–333), the same as M127 (lines 314–320), the two ends of the revision range in the debt file's "Source revision" entry:video_frame.h,VideoFramestarts withuint16_t id_and thenscoped_refptr<VideoFrameBuffer> video_frame_buffer_, a single pointer (scoped_refptr.h), so the buffer is at offset 8. That is the same at M127.VideoFrameBufferderives fromRefCountInterface:AddRef0,Release1, the Itanium destructor pair 2–3, thentype4,width5,height6. The declarations are the same at M127.src/VideoFrameDimensions.cppreads the buffer pointer, returns 0 when it is null, and otherwise calls slot 5 or 6 with the buffer asthis(APS5_VABI). It starts withvideo_frame.cc's notice copied byte for byte, plus the WebRTC BSD licence, as the other libwebrtc ports do. A null frame, a null vtable or a null slot, which upstream dereferences, throws. Reference counts are not touched, as upstream does not touch them.WebRtcVideoFrameDimensionsprefix header rather than aVideoFrame.hpp, because alvaroelpob's open VideoFrame series (#15274, #15275, #15276) adds its owninclude/VideoFrame.hpp. Those PRs leavewidthandheightas stubs. If #15276 merges first, I'll switch these two to itsWebRtcVideoFramestruct.Tested
Linux x86-64 (Ubuntu 26.04, GCC 15, Release):
New registered ctest
guest_webrtc_video_frame_dimensions:this, and the 256-byte frame storage (guard-filled) is unchanged;On
main: the test fails with_ZNK6webrtc10VideoFrame5widthEv_nid_postfix not implemented, so the libwebrtc group goes from 13 passed and 1 failed to 14/14 with this PR.Mutation check: swapping slots 5 and 6 fails with
libwebrtc VideoFrame dimensions check failed at line 41.Windows 11 (build 26300, WinLibs MinGW-w64 GCC 15.2.0 UCRT, Release):
ctest -R webrtcpasses 14/14 at 96a941f038, with no warnings in the new files.mainon Windows, becausemaindeclares both exports as(void).main's library.python3 tools/check_conventions.py --base origin/main: all conventions checks passed. The public-header audit passed: 406 libraries, 28,350 exports.python3 tools/pr_overlap.py --branch feat/libwebrtc-video-frame-dimensions: no open PR implements these exports, but some lines are shared:Export.cppandApi.hpp, because they remove the neighbouring Builder andrender_time_msstubs on adjacent lines. Their CMake changes merge cleanly.docs/dev/debt/libwebrtc.mdis shared with most open libwebrtc PRs: #14224, #14232, #14381, #15092, #15190–#15192, #15194, #15197, #15211, #15261–#15264, #15266–#15270, #15272, #15274–#15277, #15285 and #15609.Whichever merges second recounts and rebases.
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