Title: [283309] trunk
Revision
283309
Author
eoca...@igalia.com
Date
2021-09-30 05:47:30 -0700 (Thu, 30 Sep 2021)

Log Message

[MSE][GStreamer] Allow infinite duration on MSE
https://bugs.webkit.org/show_bug.cgi?id=231017

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Positive infinite duration isn't properly working on MSE in the glib (GStreamer) ports. When
such a duration is set, nothing happens and the default zero duration remains. This can break
some live streams, because the wrong duration has influence in the real seek target time
used[1], so the seek may end up being done to the wrong time (before the buffered ranges in
my case) and the playback never starts.

[1] https://github.com/WebKit/WebKit/blob/a12c487/Source/WebCore/html/HTMLMediaElement.cpp#L3153

Covered by existing tests.

* platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::durationChanged): Don't discard the change on infinite duration.

LayoutTests:

* platform/glib/TestExpectations: mediasource-seekable.html now passes.
* platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt: Changed expectations because this test now passes for audio/mpeg <-> audio/mpeg.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (283308 => 283309)


--- trunk/LayoutTests/ChangeLog	2021-09-30 12:47:13 UTC (rev 283308)
+++ trunk/LayoutTests/ChangeLog	2021-09-30 12:47:30 UTC (rev 283309)
@@ -1,3 +1,13 @@
+2021-09-30  Enrique Ocaña González  <eoca...@igalia.com>
+
+        [MSE][GStreamer] Allow infinite duration on MSE
+        https://bugs.webkit.org/show_bug.cgi?id=231017
+
+        Reviewed by Alicia Boya Garcia.
+
+        * platform/glib/TestExpectations: mediasource-seekable.html now passes.
+        * platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt: Changed expectations because this test now passes for audio/mpeg <-> audio/mpeg.
+
 2021-09-30  Youenn Fablet  <you...@apple.com>
 
         Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure

Modified: trunk/LayoutTests/platform/glib/TestExpectations (283308 => 283309)


--- trunk/LayoutTests/platform/glib/TestExpectations	2021-09-30 12:47:13 UTC (rev 283308)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-09-30 12:47:30 UTC (rev 283309)
@@ -2258,7 +2258,6 @@
 webkit.org/b/211940 fast/text/multiple-codeunit-vertical-upright.html [ ImageOnlyFailure ]
 
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-sequencemode-append-buffer.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-seekable.html [ Failure ]
 webkit.org/b/197711 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html [ Pass Timeout Failure ]
 webkit.org/b/214349 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative.html [ Crash Failure Pass ]
 webkit.org/b/203078 imported/w3c/web-platform-tests/media-source/mediasource-seek-beyond-duration.html [ Failure ]

Modified: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt (283308 => 283309)


--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt	2021-09-30 12:47:13 UTC (rev 283308)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt	2021-09-30 12:47:30 UTC (rev 283309)
@@ -4,7 +4,7 @@
 PASS Test audio-only implicit changeType for audio/webm; codecs="vorbis" <-> audio/webm; codecs="vorbis" (using types without codecs parameters for addSourceBuffer)
 PASS Test audio-only implicit changeType for audio/mp4; codecs="mp4a.40.2" <-> audio/mp4; codecs="mp4a.40.2"
 PASS Test audio-only implicit changeType for audio/mp4; codecs="mp4a.40.2" <-> audio/mp4; codecs="mp4a.40.2" (using types without codecs parameters for addSourceBuffer)
-FAIL Test audio-only implicit changeType for audio/mpeg <-> audio/mpeg assert_less_than: expected a number less than 0 but got 2.1
+PASS Test audio-only implicit changeType for audio/mpeg <-> audio/mpeg
 PASS Test video-only implicit changeType for video/webm; codecs="vp8" <-> video/webm; codecs="vp8"
 PASS Test video-only implicit changeType for video/webm; codecs="vp8" <-> video/webm; codecs="vp8" (using types without codecs parameters for addSourceBuffer)
 FAIL Test video-only implicit changeType for video/webm; codecs="vp8" <-> video/webm; codecs="vp9" assert_unreached: Unexpected event 'error' Reached unreachable code

Modified: trunk/Source/WebCore/ChangeLog (283308 => 283309)


--- trunk/Source/WebCore/ChangeLog	2021-09-30 12:47:13 UTC (rev 283308)
+++ trunk/Source/WebCore/ChangeLog	2021-09-30 12:47:30 UTC (rev 283309)
@@ -1,3 +1,23 @@
+2021-09-30  Enrique Ocaña González  <eoca...@igalia.com>
+
+        [MSE][GStreamer] Allow infinite duration on MSE
+        https://bugs.webkit.org/show_bug.cgi?id=231017
+
+        Reviewed by Alicia Boya Garcia.
+
+        Positive infinite duration isn't properly working on MSE in the glib (GStreamer) ports. When
+        such a duration is set, nothing happens and the default zero duration remains. This can break
+        some live streams, because the wrong duration has influence in the real seek target time
+        used[1], so the seek may end up being done to the wrong time (before the buffered ranges in
+        my case) and the playback never starts.
+
+        [1] https://github.com/WebKit/WebKit/blob/a12c487/Source/WebCore/html/HTMLMediaElement.cpp#L3153
+
+        Covered by existing tests.
+
+        * platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
+        (WebCore::MediaSourcePrivateGStreamer::durationChanged): Don't discard the change on infinite duration.
+
 2021-09-30  Kimmo Kinnunen  <kkinnu...@apple.com>
 
         GraphicsContextGLAttributes::hasFenceSync should be a property of GraphicsContextGLOpenGL

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp (283308 => 283309)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp	2021-09-30 12:47:13 UTC (rev 283308)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp	2021-09-30 12:47:30 UTC (rev 283309)
@@ -106,7 +106,7 @@
 
     MediaTime duration = m_mediaSource->duration();
     GST_TRACE("duration: %f", duration.toFloat());
-    if (!duration.isValid() || duration.isPositiveInfinite() || duration.isNegativeInfinite())
+    if (!duration.isValid() || duration.isNegativeInfinite())
         return;
 
     m_playerPrivate.durationChanged();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to