feat(libwebrtc): implement webrtc::VideoDecoder::GetDecoderInfo #17707
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17707"
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-09T11:15:36Z.
What
Implements
webrtc::VideoDecoder::GetDecoderInfoin libwebrtc, adapted from video_decoder.cc. The WebRTC notice and BSD licence head the file. It is the default a title'sVideoDecodersubclass gets when it does not overrideGetDecoderInfo.Same code at both bounding revisions.
GetDecoderInfois identical at M127 (e0b28a6a81) and M134 (8d78f5de6c).video_decoder.his the same at both; the headers differ inabsl::optionalversusstd::optional, includes and a commented-out parameter name.Configure, the twoDecodeoverloads,RegisterDecodeCompleteCallback,Release,GetDecoderInfoandImplementationName. That putsImplementationNameat slot 8.Result.
DecoderInfoholds astd::string, so it is returned through hidden storage. The storage is 48 bytes: the gueststd::string(WebRtcGuestString) at 0 andis_hardware_acceleratedat 40.What the export does. It fills that storage with the name
ImplementationNamereturns andfalse, which is what upstream's default-constructedDecoderInfofollowed byimplementation_name = ImplementationName()leaves.The guest string follows the repository's
libcstring rules, not a reading of the console'slibwebrtc.sprx.FillMessageand the other string builders inlibcleave it.length | 15throughGuestStringStorage, including its large-allocation rule.length | 15is also what Dinkumware's geometric growth gives, because15 + 15 / 2is never larger.Null cases. A null result, decoder, vtable,
ImplementationNameslot or name throws. Upstream would crash on the null name instrlen.Tested
Windows 11, MinGW GCC Release build.
guest_webrtc_video_decoderis new;guest_webrtc_video_encoderandguest_webrtc_rtc_errorstill pass. The new test covers:GuestStringStorage::Deallocate;Negative controls: using slot 7, or dropping the
| 15mask, both fail the test.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchmerged all 23 overlapping pull requests cleanly.TestAllocateand the other heap callbacks. Those are anonymous-namespace helpers in separate test executables, not exports.main; none touchesVideoDecoder.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)