Changeset 261165 in webkit


Ignore:
Timestamp:
May 5, 2020 7:36:50 AM (4 years ago)
Author:
aboya@igalia.com
Message:

[GStreamer] Video loops when ran in rr record --chaos
https://bugs.webkit.org/show_bug.cgi?id=211182

Reviewed by Philippe Normand.

Source/WebCore:

While trying to investigate a different bug, I ran the browser with
rr record --chaos, which makes it run very slowly and shuffles
thread scheduling to try to make existing race conditions more likely
to show up, also inevitably making the software run very slow.

Doing so I found something strange: the video kept looping even though
it didn't have the loop attribute set.

After some debugging I found that MediaPlayer decides if the video has
ended in part by checking currentMediaTime() is greater or equal to
the video duration, which was not guaranteed to be the case in
MediaPlayerPrivateGStreamer.

As a consequence of this patch, one new LayoutTest has passed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):

LayoutTests:

imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html
is now passing.

  • platform/gtk/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r261162 r261165  
     12020-05-05  Alicia Boya García  <aboya@igalia.com>
     2
     3        [GStreamer] Video loops when ran in rr record --chaos
     4        https://bugs.webkit.org/show_bug.cgi?id=211182
     5
     6        Reviewed by Philippe Normand.
     7
     8        imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html
     9        is now passing.
     10
     11        * platform/gtk/TestExpectations:
     12
    1132020-05-05  Antoine Quint  <graouts@apple.com>
    214
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r261161 r261165  
    16081608webkit.org/b/203078 media/media-source/media-source-seek-complete.html [ Pass Crash ]
    16091609webkit.org/b/203078 media/media-source/media-source-seek-detach-crash.html [ Pass Crash ]
    1610 webkit.org/b/203078 imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html [ Failure Crash ]
    16111610webkit.org/b/203078 imported/w3c/web-platform-tests/media-source/mediasource-replay.html [ Failure Crash ]
    16121611webkit.org/b/203078 imported/w3c/web-platform-tests/media-source/mediasource-seek-during-pending-seek.html [ Pass Crash ]
  • trunk/Source/WebCore/ChangeLog

    r261164 r261165  
     12020-05-05  Alicia Boya García  <aboya@igalia.com>
     2
     3        [GStreamer] Video loops when ran in rr record --chaos
     4        https://bugs.webkit.org/show_bug.cgi?id=211182
     5
     6        Reviewed by Philippe Normand.
     7
     8        While trying to investigate a different bug, I ran the browser with
     9        `rr record --chaos`, which makes it run very slowly and shuffles
     10        thread scheduling to try to make existing race conditions more likely
     11        to show up, also inevitably making the software run very slow.
     12
     13        Doing so I found something strange: the video kept looping even though
     14        it didn't have the `loop` attribute set.
     15
     16        After some debugging I found that MediaPlayer decides if the video has
     17        ended in part by checking `currentMediaTime()` is greater or equal to
     18        the video duration, which was not guaranteed to be the case in
     19        MediaPlayerPrivateGStreamer.
     20
     21        As a consequence of this patch, one new LayoutTest has passed.
     22
     23        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     24        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
     25
    1262020-05-05  Zalan Bujtas  <zalan@apple.com>
    227
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r260987 r261165  
    13881388{
    13891389    GST_TRACE_OBJECT(pipeline(), "isEndReached: %s, seeking: %s, seekTime: %s", boolForPrinting(m_isEndReached), boolForPrinting(m_isSeeking), m_seekTime.toString().utf8().data());
    1390     if (m_isEndReached && m_isSeeking)
     1390    if (m_isSeeking)
    13911391        return m_seekTime;
     1392    if (m_isEndReached)
     1393        return m_playbackRate > 0 ? durationMediaTime() : MediaTime::zeroTime();
    13921394
    13931395    // This constant should remain lower than HTMLMediaElement's maxTimeupdateEventFrequency.
Note: See TracChangeset for help on using the changeset viewer.