RESOLVED FIXED253997
MockSourceBufferPrivate should only process samples once init segment has been processed.
https://bugs.webkit.org/show_bug.cgi?id=253997
Summary MockSourceBufferPrivate should only process samples once init segment has bee...
Jean-Yves Avenard [:jya]
Reported 2023-03-15 18:34:35 PDT
This blocks bug 225367. Currently, MockSourceBufferPrivate::append process init and media segments in the same loop. [1] Immediately after parsing the init segment, it calls SourceBufferPrivate::didReceiveSample SourceBufferPrivate::didReceiveSample will drop any frames with an unknown track buffer ID. [2] This is fine when the MockSourceBufferPrivate runs in the content process and the entire append operation is synchronous. However, when the operation occurs in the GPU Process, the track id will not be usable until the initialisation segment has been sent back to the content process to be processed by the SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment [3] so that it can create a new TrackBuffer. the SourceBufferPrivateAVFObjC will queue all demuxed frames until after sourceBufferPrivateDidReceiveInitializationSegment has completed (which is an asynchronous operation). and only call SourceBufferPrivate::didReceiveSample once done [4] [1] https://searchfox.org/wubkat/rev/23d40f46815dafd5828fa1932569943b85f8f24e/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp#141-157 [2] https://searchfox.org/wubkat/rev/23d40f46815dafd5828fa1932569943b85f8f24e/Source/WebCore/platform/graphics/SourceBufferPrivate.cpp#670-679 [3] https://searchfox.org/wubkat/source/Source/WebCore/Modules/mediasource/SourceBuffer.cpp#856-857 [4] https://searchfox.org/wubkat/rev/23d40f46815dafd5828fa1932569943b85f8f24e/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm#466-474
Attachments
Jean-Yves Avenard [:jya]
Comment 1 2023-03-15 18:36:36 PDT
We need to have MockSourceBufferPrivate follow a similar pattern or SourceBufferPrivateAVFObjC ; or preferably have SourceBufferPrivate handle this in a platform agnostic fashion. The latter allowing to wrap all SourceBufferPrivate implementation in a RemoteSourceBufferPrivate (and run in the GPU Process)
Radar WebKit Bug Importer
Comment 2 2023-03-15 18:36:54 PDT
Jean-Yves Avenard [:jya]
Comment 3 2023-03-16 02:27:55 PDT
EWS
Comment 4 2023-03-17 10:43:34 PDT
Committed 261799@main (30fd635c1cbe): <https://commits.webkit.org/261799@main> Reviewed commits have been landed. Closing PR #11599 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.