- Revision
- 274563
- Author
- peng.l...@apple.com
- Date
- 2021-03-17 10:06:08 -0700 (Wed, 17 Mar 2021)
Log Message
[GPUP] Some media-source tests fail/timeout when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221686
Reviewed by Eric Carlson.
Source/WebKit:
With "GPU Process: Media" enabled, a video element with a reference to a `MediaSource`
object will schedule a "resize" event after the source buffer scheduling an "update" event.
The root cause is that the `MediaPlayerPrivateRemote` does not notify its `HTMLMediaElement`
to change its ready state to HAVE_METADATA after the source buffer receives the initialization
segment (in `SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment()`).
The requirement is defined in section 3.5.7.6.2 of the specification:
[Initialization Segment Received](https://www.w3.org/TR/media-source/#sourcebuffer-init-segment-received).
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setReadyState):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::setReadyState):
LayoutTests:
Fix the wrong description of a test.
* media/media-source/media-source-resize-expected.txt:
* media/media-source/media-source-resize.html:
* platform/gtk/media/media-source/media-source-resize-expected.txt:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (274562 => 274563)
--- trunk/LayoutTests/ChangeLog 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/LayoutTests/ChangeLog 2021-03-17 17:06:08 UTC (rev 274563)
@@ -1,3 +1,17 @@
+2021-03-17 Peng Liu <peng.l...@apple.com>
+
+ [GPUP] Some media-source tests fail/timeout when media in GPU Process is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=221686
+
+ Reviewed by Eric Carlson.
+
+ Fix the wrong description of a test.
+
+ * media/media-source/media-source-resize-expected.txt:
+ * media/media-source/media-source-resize.html:
+ * platform/gtk/media/media-source/media-source-resize-expected.txt:
+ * platform/mac/TestExpectations:
+
2021-03-17 Alexey Shvayka <shvaikal...@gmail.com>
[WebIDL] Fix convertRecord() to throw on enumerable symbol |key|
Modified: trunk/LayoutTests/media/media-source/media-source-resize-expected.txt (274562 => 274563)
--- trunk/LayoutTests/media/media-source/media-source-resize-expected.txt 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/LayoutTests/media/media-source/media-source-resize-expected.txt 2021-03-17 17:06:08 UTC (rev 274563)
@@ -1,4 +1,4 @@
-This tests the ability of the SourceBuffer to reset the parser after an abort(). A SourceBuffer in this state should be able to accept a new initialization segment or a new media segment.
+This tests that a video element receives "resize" event correctly when we append initialization and media segment to its source buffer.
RUN(video.src = ""
EVENT(sourceopen)
Modified: trunk/LayoutTests/media/media-source/media-source-resize.html (274562 => 274563)
--- trunk/LayoutTests/media/media-source/media-source-resize.html 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/LayoutTests/media/media-source/media-source-resize.html 2021-03-17 17:06:08 UTC (rev 274563)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>media-source-abort-resets-parser</title>
+ <title>media-source-resize</title>
<script src=""
<script src=""
<script>
@@ -54,8 +54,8 @@
</head>
<body _onload_="runTest()">
<div>
- This tests the ability of the SourceBuffer to reset the parser after an abort(). A SourceBuffer in this state should be able to accept
- a new initialization segment or a new media segment.
+ This tests that a video element receives "resize" event correctly
+ when we append initialization and media segment to its source buffer.
</div>
<video controls></video>
</body>
Modified: trunk/LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt (274562 => 274563)
--- trunk/LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt 2021-03-17 17:06:08 UTC (rev 274563)
@@ -1,4 +1,4 @@
-This tests the ability of the SourceBuffer to reset the parser after an abort(). A SourceBuffer in this state should be able to accept a new initialization segment or a new media segment.
+This tests that a video element receives "resize" event correctly when we append initialization and media segment to its source buffer.
RUN(video.src = ""
EVENT(sourceopen)
Modified: trunk/LayoutTests/platform/mac/TestExpectations (274562 => 274563)
--- trunk/LayoutTests/platform/mac/TestExpectations 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2021-03-17 17:06:08 UTC (rev 274563)
@@ -868,7 +868,6 @@
# webkit.org/b/221686
imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions.html [ Failure ]
imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Failure ]
-media/media-source/media-source-resize.html [ Timeout ]
platform/mac/media/media-source/videoplaybackquality-decompressionsession.html [ Failure ]
# Requires WebM
Modified: trunk/Source/WebKit/ChangeLog (274562 => 274563)
--- trunk/Source/WebKit/ChangeLog 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/Source/WebKit/ChangeLog 2021-03-17 17:06:08 UTC (rev 274563)
@@ -1,3 +1,25 @@
+2021-03-17 Peng Liu <peng.l...@apple.com>
+
+ [GPUP] Some media-source tests fail/timeout when media in GPU Process is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=221686
+
+ Reviewed by Eric Carlson.
+
+ With "GPU Process: Media" enabled, a video element with a reference to a `MediaSource`
+ object will schedule a "resize" event after the source buffer scheduling an "update" event.
+ The root cause is that the `MediaPlayerPrivateRemote` does not notify its `HTMLMediaElement`
+ to change its ready state to HAVE_METADATA after the source buffer receives the initialization
+ segment (in `SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment()`).
+ The requirement is defined in section 3.5.7.6.2 of the specification:
+ [Initialization Segment Received](https://www.w3.org/TR/media-source/#sourcebuffer-init-segment-received).
+
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+ (WebKit::MediaPlayerPrivateRemote::setReadyState):
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
+
+ * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
+ (WebKit::SourceBufferPrivateRemote::setReadyState):
+
2021-03-17 Brent Fulgham <bfulg...@apple.com>
[Cocoa] Move loadSimulatedRequest API from Private to Public WKWebView
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (274562 => 274563)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2021-03-17 17:06:08 UTC (rev 274563)
@@ -287,6 +287,12 @@
m_player->networkStateChanged();
}
+void MediaPlayerPrivateRemote::setReadyState(MediaPlayer::ReadyState readyState)
+{
+ m_cachedState.readyState = readyState;
+ m_player->readyStateChanged();
+}
+
void MediaPlayerPrivateRemote::readyStateChanged(RemoteMediaPlayerState&& state)
{
updateCachedState(WTFMove(state));
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (274562 => 274563)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2021-03-17 17:06:08 UTC (rev 274563)
@@ -90,6 +90,7 @@
WebCore::MediaPlayer* player() const { return m_player; }
WebCore::MediaPlayer::ReadyState readyState() const final { return m_cachedState.readyState; }
+ void setReadyState(WebCore::MediaPlayer::ReadyState);
void networkStateChanged(RemoteMediaPlayerState&&);
void readyStateChanged(RemoteMediaPlayerState&&);
Modified: trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp (274562 => 274563)
--- trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp 2021-03-17 16:53:47 UTC (rev 274562)
+++ trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp 2021-03-17 17:06:08 UTC (rev 274563)
@@ -120,6 +120,9 @@
if (!m_mediaSourcePrivate)
return;
+ if (m_mediaPlayerPrivate)
+ m_mediaPlayerPrivate->setReadyState(state);
+
if (!m_gpuProcessConnection)
return;