Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30fd635c1cbe03f0e163665820c13900784a7336
      
https://github.com/WebKit/WebKit/commit/30fd635c1cbe03f0e163665820c13900784a7336
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M Source/WebCore/Modules/mediasource/SourceBuffer.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivate.h
    M Source/WebCore/platform/graphics/SourceBufferPrivateClient.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivateClient.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
    M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
    M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h

  Log Message:
  -----------
  MockSourceBufferPrivate should only process samples once init segment has 
been processed.
https://bugs.webkit.org/show_bug.cgi?id=253997
rdar://106784564

Reviewed by Youenn Fablet.

The ability of a SourceBufferPrivate to run in the GPU process required
some steps to be done asynchronously.
In particular no demuxed media segments should be processed until all
track buffers had been created as they would otherwise be dropped.
Currently, only the SourceBufferPrivateAVFObjC implementation had been
modified to run asynchronously and contained very specific handlings to
do so.

We move the responsibility of queuing samples for until the init segment
has been fully processed to the base SourceBufferPrivate class.
We allows the ability for any SourceBufferPrivate implementation to be
wrapped in a SourceBufferPrivateRemote and be platform agnostic, including
the MockMediaSource.

Fly-by changes:
- Rename ReceiveResult::RecieveSucceeded to ReceiveResult::Succeeded (and fix 
typo)
- Rename AppendResult::AppendSucceeded to AppendResult::Succeeded
- By spec, the Reset Parser State should process any frames left in the
  input buffer.

* Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::appendCompleted):
(WebCore::SourceBufferPrivate::didReceiveInitializationSegment):
(WebCore::SourceBufferPrivate::didReceiveSampleForTrackId):
(WebCore::SourceBufferPrivate::didReceiveSample):
(WebCore::SourceBufferPrivate::processPendingSamples):
(WebCore::SourceBufferPrivate::resetParserState): Make default implementation.
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::appendCompleted):
* Source/WebCore/platform/graphics/SourceBufferPrivateClient.cpp:
(WebCore::convertEnumerationToString):
* Source/WebCore/platform/graphics/SourceBufferPrivateClient.h: Rename enum as 
name already contained in type.
* 
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* 
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* 
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackId):
(WebCore::SourceBufferPrivateAVFObjC::processPendingTrackChangeTasks):
(WebCore::SourceBufferPrivateAVFObjC::didReceiveSampleForTrackId):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
* 
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::resetParserState):
* Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp: Remove 
unnecessary method.
(WebCore::MockSourceBufferPrivate::resetParserState): Deleted.
* Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h: Remove 
unnecessary method.

Canonical link: https://commits.webkit.org/261799@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to