Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0773c9839a9a2baece6bcd80248bdfe90aefca84
https://github.com/WebKit/WebKit/commit/0773c9839a9a2baece6bcd80248bdfe90aefca84
Author: Jer Noble <[email protected]>
Date: 2023-01-23 (Mon, 23 Jan 2023)
Changed paths:
M LayoutTests/media/media-source/media-source-loader.js
A
LayoutTests/media/media-source/media-source-seek-into-unbuffered-expected.txt
A LayoutTests/media/media-source/media-source-seek-into-unbuffered.html
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Log Message:
-----------
defau[Cocoa] Netflix sometimes fails to start playback
https://bugs.webkit.org/show_bug.cgi?id=250844
rdar://102426333
Reviewed by Eric Carlson.
Before moving MediaSource into the GPU process, a seek command would result in
a lot of
synchronous calls between the HTMLMediaElement, MediaSource, and
MediaPlayerPrivate. Now
that those classes exist on the far side of an XPC boundary from one another,
those calls
have become async.
One problem is that the seek command will result in asking the
AVSampleBufferRenderSynchronizer's
timebase to seek, and the notification of that seek's completion will occur
_before_ the
command from the WebContent process to wait for seek completion. So seeking
outside a buffered
range will appear to succeed when it should fail (until data for that location
is appended).
Secondly, the second time this happens, the wait for seek completion command is
ignored because
the m_seeking flag has already been cleared by the time this message is
received.
Because we know that the we will always be issued a command to wait for seek
completion after
a command to issue a seek, just call waitForSeekCompleted() from within the
seekInternal() method.
Secondly, remove the requirement for m_seeking to be set.
In LayoutTests/media/media-source/media-source-loader.js, update the
MediaSourceLoaded class to
use and return promises.
* LayoutTests/media/media-source/media-source-loader.js:
(MediaSourceLoader):
(MediaSourceLoader.prototype.async if):
(MediaSourceLoader.prototype.load):
(MediaSourceLoader.prototype.async try):
(MediaSourceLoader.prototype.loadManifest):
(MediaSourceLoader.prototype.loadMediaData):
(MediaSourceLoader.prototype.loadManifestSucceeded): Deleted.
(MediaSourceLoader.prototype.loadManifestFailed): Deleted.
(MediaSourceLoader.prototype.loadMediaDataSucceeded): Deleted.
(MediaSourceLoader.prototype.loadMediaDataFailed): Deleted.
*
LayoutTests/media/media-source/media-source-seek-into-unbuffered-expected.txt:
Added.
* LayoutTests/media/media-source/media-source-seek-into-unbuffered.html: Added.
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted):
Canonical link: https://commits.webkit.org/259219@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes