⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283309 in webkit


Ignore:
Timestamp:
Sep 30, 2021, 5:47:30 AM (5 years ago)
Author:
eocanha@igalia.com
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.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r283307 r283309  
     12021-09-30  Enrique Ocaña González  <eocanha@igalia.com>
     2
     3        [MSE][GStreamer] Allow infinite duration on MSE
     4        https://bugs.webkit.org/show_bug.cgi?id=231017
     5
     6        Reviewed by Alicia Boya Garcia.
     7
     8        * platform/glib/TestExpectations: mediasource-seekable.html now passes.
     9        * 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.
     10
    1112021-09-30  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/LayoutTests/platform/glib/TestExpectations

    r283217 r283309  
    22592259
    22602260webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-sequencemode-append-buffer.html [ Failure ]
    2261 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-seekable.html [ Failure ]
    22622261webkit.org/b/197711 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html [ Pass Timeout Failure ]
    22632262webkit.org/b/214349 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative.html [ Crash Failure Pass ]
  • trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt

    r282118 r283309  
    55PASS Test audio-only implicit changeType for audio/mp4; codecs="mp4a.40.2" <-> audio/mp4; codecs="mp4a.40.2"
    66PASS 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)
    7 FAIL Test audio-only implicit changeType for audio/mpeg <-> audio/mpeg assert_less_than: expected a number less than 0 but got 2.1
     7PASS Test audio-only implicit changeType for audio/mpeg <-> audio/mpeg
    88PASS Test video-only implicit changeType for video/webm; codecs="vp8" <-> video/webm; codecs="vp8"
    99PASS Test video-only implicit changeType for video/webm; codecs="vp8" <-> video/webm; codecs="vp8" (using types without codecs parameters for addSourceBuffer)
  • trunk/Source/WebCore/ChangeLog

    r283308 r283309  
     12021-09-30  Enrique Ocaña González  <eocanha@igalia.com>
     2
     3        [MSE][GStreamer] Allow infinite duration on MSE
     4        https://bugs.webkit.org/show_bug.cgi?id=231017
     5
     6        Reviewed by Alicia Boya Garcia.
     7
     8        Positive infinite duration isn't properly working on MSE in the glib (GStreamer) ports. When
     9        such a duration is set, nothing happens and the default zero duration remains. This can break
     10        some live streams, because the wrong duration has influence in the real seek target time
     11        used[1], so the seek may end up being done to the wrong time (before the buffered ranges in
     12        my case) and the playback never starts.
     13
     14        [1] https://github.com/WebKit/WebKit/blob/a12c487/Source/WebCore/html/HTMLMediaElement.cpp#L3153
     15
     16        Covered by existing tests.
     17
     18        * platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
     19        (WebCore::MediaSourcePrivateGStreamer::durationChanged): Don't discard the change on infinite duration.
     20
    1212021-09-30  Kimmo Kinnunen  <kkinnunen@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp

    r277031 r283309  
    107107    MediaTime duration = m_mediaSource->duration();
    108108    GST_TRACE("duration: %f", duration.toFloat());
    109     if (!duration.isValid() || duration.isPositiveInfinite() || duration.isNegativeInfinite())
     109    if (!duration.isValid() || duration.isNegativeInfinite())
    110110        return;
    111111
Note: See TracChangeset for help on using the changeset viewer.