[webkit-changes] [WebKit/WebKit] 939ec6: REGRESSION(267279 at main): [ macOS wk2 ] imported/w3...

Jean-Yves Avenard noreply at github.com
Thu Sep 7 04:32:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 939ec6849c62f57b06b35da53db9f9794036cdd5
      https://github.com/WebKit/WebKit/commit/939ec6849c62f57b06b35da53db9f9794036cdd5
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/platform/graphics/MediaPlayer.cpp
    M Source/WebCore/platform/graphics/MediaPlayer.h
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
    M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in

  Log Message:
  -----------
  REGRESSION(267279 at main): [ macOS wk2 ] imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html is a consistent text failure.
https://bugs.webkit.org/show_bug.cgi?id=260833
rdar://114594559

Reviewed by Jer Noble.

The `seeked` event wasn't received by the test as expected.
There were multiple reasons for this to occur:
1- The content processed assumed that the first timeUpdate message received
from the GPU process indicated that the pending seek operation had completed.
However, this wasn't always the case as timeUpdate can be send from the GPU
to the CP outside seeking (when playback has started and currentTime as progressed,
when playback has reached the end, when playback has skipped a gap etc)
Those messages are sent asynchronously from the GPU to the CP and could
have been received after the CP had started seeking, it would
incorrectly link this message to the end of the seek operation. So we
add a new IPC message `seeked` to no longer link seeking to timeUpdate and
uniquely identifies when the seek operation has been completed.
We only need to deal with this new event when the GPU process is involved
as when there's no GPU process seek/timeupdate are properly matched.

2- The MediaPlayerPrivateMediaSourceAVFObjC implementation was waiting
for a callback from the AVSampleBufferRenderSynchronizer after the seek
to complete the seek operation. However, if we seeked to the same location
as what the current time is, no callback occured. The code compared the
synchronizer's "timeBase" vs currentTime.

There is an extra issue with the test itself, it always assumes that the
`seeked` event will be fired in a different event loop that fired the
`seeking` event. The fixes above avoid this problem for now.

* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::seeked):
* Source/WebCore/platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerSeeked):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekToTarget):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::seekToTarget):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seekToTarget):
(WebCore::MediaPlayerPrivateGStreamer::timeChanged):
(WebCore::MediaPlayerPrivateGStreamer::finishSeek):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::propagateReadyStateToPlayer):
(WebCore::MediaPlayerPrivateGStreamerMSE::asyncStateChangeDone):
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::seekToTarget):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::seekToTarget):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerSeeked):
(WebKit::RemoteMediaPlayerProxy::updateCachedState):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::seekToTarget): Add logging.
(WebKit::MediaPlayerPrivateRemote::setReadyState): Add logging.
(WebKit::MediaPlayerPrivateRemote::readyStateChanged): Add logging.
(WebKit::MediaPlayerPrivateRemote::seeked):
(WebKit::MediaPlayerPrivateRemote::timeChanged): Add logging.
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h: Remove the seeking
attribute. It is no longer needed as "seeked" as its own IPC message.
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in:

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




More information about the webkit-changes mailing list