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

Changeset 243589 in webkit


Ignore:
Timestamp:
Mar 27, 2019, 4:48:01 PM (7 years ago)
Author:
Adrian Perez de Castro
Message:

Merged r243489 - [GStreamer] Sound loop with Google Hangouts and WhatsApp notifications
https://bugs.webkit.org/show_bug.cgi?id=189471

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The media duration is now cached (again). The loop issue was
triggered by the previous version of the code returning positive
infinite duration in didEnd(), followed by the timeupdate event
propagation that would trick the HTMLMediaElement into a new call
to play(). Now the cached duration is updated to current position
at EOS (for forward playback direction only), so the media element
no longer triggers a new play call for those cases.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
(WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::durationChanged):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):

LayoutTests:

  • platform/gtk/TestExpectations:
  • platform/gtk/media/video-playing-and-pause-expected.txt:
Location:
releases/WebKitGTK/webkit-2.24
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r243588 r243589  
     12019-03-26  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] Sound loop with Google Hangouts and WhatsApp notifications
     4        https://bugs.webkit.org/show_bug.cgi?id=189471
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        * platform/gtk/TestExpectations:
     9        * platform/gtk/media/video-playing-and-pause-expected.txt:
     10
    1112019-03-22  Alicia Boya García  <aboya@igalia.com>
    212
  • releases/WebKitGTK/webkit-2.24/LayoutTests/platform/gtk/TestExpectations

    r242417 r243589  
    14861486webkit.org/b/116976 media/video-played-collapse.html [ Failure Pass Crash ]
    14871487
    1488 webkit.org/b/116977 media/event-attributes.html [ Crash Failure Timeout Pass ]
    1489 
    14901488webkit.org/b/103443 fast/parser/parser-yield-timing.html [ Failure Pass ]
    1491 
    1492 webkit.org/b/105191 media/video-playing-and-pause.html [ Failure Pass ]
    1493 
    1494 webkit.org/b/118460 media/media-element-play-after-eos.html [ Timeout Pass ]
    14951489
    14961490webkit.org/b/119009 http/tests/cache/subresource-failover-to-network.html [ Failure Pass ]
     
    17021696
    17031697webkit.org/b/134981 fast/parser/document-write-during-load.html [ Timeout Pass Crash ]
    1704 
    1705 webkit.org/b/81604 media/video-loop.html [ Timeout Pass ]
    17061698
    17071699webkit.org/b/134998 plugins/change-widget-and-click-crash.html [ Timeout Pass Crash ]
     
    37563748webkit.org/b/194611 http/wpt/webrtc/getUserMedia-processSwapping.html [ Failure ]
    37573749
     3750webkit.org/b/195133 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-3.html [ Failure ]
     3751
     3752webkit.org/b/195134 inspector/cpu-profiler/threads.html [ Failure ]
     3753webkit.org/b/195134 inspector/cpu-profiler/tracking.html [ Failure ]
     3754
     3755webkit.org/b/195259 compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html [ ImageOnlyFailure ]
     3756
     3757webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/load-events-networkState.html [ Failure ]
     3758webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-control.html [ Failure ]
     3759webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-br.html [ Failure ]
     3760webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-source.html [ Failure ]
     3761webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-text.html [ Failure ]
     3762webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-source-after.html [ Failure ]
     3763webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-source.html [ Failure ]
     3764webkit.org/b/195670 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-text.html [ Failure ]
     3765
     3766webkit.org/b/195671 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads_without_user_activation.sub.tentative.html [ Failure ]
     3767webkit.org/b/195671 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads_without_user_activation.sub.tentative.html [ Failure ]
     3768
     3769webkit.org/b/195712 inspector/canvas/recording-html-2d.html [ Failure ]
     3770
     3771webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/event-dispatch-active-flag.html [ Failure ]
     3772webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm [ Failure ]
     3773webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance-continue-async.htm [ Failure ]
     3774webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance-exception-order.html [ Failure ]
     3775webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance-invalid.htm [ Failure ]
     3776webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance.htm [ Failure ]
     3777webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-continue-exception-order.htm [ Failure ]
     3778webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm [ Failure ]
     3779webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-continuePrimaryKey-exceptions.htm [ Failure ]
     3780webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-delete-exception-order.htm [ Failure ]
     3781webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction-index-keyrange.htm [ Failure ]
     3782webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction-index.htm [ Failure ]
     3783webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction-objectstore-keyrange.htm [ Failure ]
     3784webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction-objectstore.htm [ Failure ]
     3785webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction.htm [ Failure ]
     3786webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-iterating-update.htm [ Failure ]
     3787webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-key.htm [ Failure ]
     3788webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-primarykey.htm [ Failure ]
     3789webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor-update-exception-order.htm [ Failure ]
     3790webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbcursor_iterating.htm [ Failure ]
     3791webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbindex-query-exception-order.html [ Failure ]
     3792webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbindex-request-source.html [ Failure ]
     3793webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.html [ Failure ]
     3794webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_createIndex14-exception_order.htm [ Failure ]
     3795webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor.htm [ Failure ]
     3796webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbrequest-onupgradeneeded.htm [ Failure ]
     3797webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames.html [ Failure ]
     3798webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors-small.html [ Failure ]
     3799webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.htm [ Failure ]
     3800webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/key_valid.html [ Failure ]
     3801webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/keygenerator-explicit.html [ Failure ]
     3802webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/keygenerator-inject.html [ Failure ]
     3803webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/keygenerator.htm [ Failure ]
     3804webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers.htm [ Failure ]
     3805webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/keypath_maxsize.htm [ Failure ]
     3806webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/large-requests-abort.html [ Failure ]
     3807webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/list_ordering.htm [ Failure ]
     3808webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/request-event-ordering.html [ Failure ]
     3809webkit.org/b/196069 imported/w3c/web-platform-tests/IndexedDB/value_recursive.htm [ Failure ]
     3810webkit.org/b/196069 storage/indexeddb/transaction-coordination-across-databases.html [ Failure ]
     3811
     3812webkit.org/b/196061 editing/pasteboard/smart-paste-paragraph-001.html [ Failure ]
     3813webkit.org/b/196061 editing/pasteboard/smart-paste-paragraph-002.html [ Failure ]
     3814webkit.org/b/196061 editing/pasteboard/smart-paste-paragraph-004.html [ Failure ]
     3815
     3816webkit.org/b/196195 inspector/console/console-screenshot.html [ Failure ]
     3817
     3818webkit.org/b/196196 inspector/audit/run-resources.html [ Failure ]
     3819
     3820webkit.org/b/196197 http/wpt/cache-storage/cache-quota-after-restart.any.html [ Failure ]
     3821
     3822webkit.org/b/196199 http/tests/IndexedDB/storage-limit-1.https.html [ Failure ]
     3823
     3824webkit.org/b/196201 fast/text/ja-sans-serif.html [ ImageOnlyFailure ]
     3825
     3826webkit.org/b/116977 media/event-attributes.html [ Failure ]
     3827
    37583828#////////////////////////////////////////////////////////////////////////////////////////
    37593829# End of non-crashing, non-flaky tests failing
  • releases/WebKitGTK/webkit-2.24/LayoutTests/platform/gtk/media/video-playing-and-pause-expected.txt

    r148815 r243589  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x317
    4   RenderBlock {HTML} at (0,0) size 800x317
    5     RenderBody {BODY} at (8,16) size 784x293
    6       RenderBlock {P} at (0,0) size 784x34
    7         RenderText {#text} at (0,0) size 766x34
    8           text run at (0,0) width 766: "Test that pausing the media element in \"playing\" event handler pauses the media immediately. The video should show the"
    9           text run at (0,17) width 68: "first frame."
    10       RenderBlock (anonymous) at (0,50) size 784x243
     3layer at (0,0) size 800x320
     4  RenderBlock {HTML} at (0,0) size 800x320
     5    RenderBody {BODY} at (8,16) size 784x296
     6      RenderBlock {P} at (0,0) size 784x36
     7        RenderText {#text} at (0,0) size 764x35
     8          text run at (0,0) width 764: "Test that pausing the media element in \"playing\" event handler pauses the media immediately. The video should show the"
     9          text run at (0,18) width 68: "first frame."
     10      RenderBlock (anonymous) at (0,52) size 784x244
    1111        RenderText {#text} at (0,0) size 0x0
    12 layer at (8,66) size 320x240
     12layer at (8,68) size 320x240
    1313  RenderVideo {VIDEO} at (0,0) size 320x240
    14 layer at (8,66) size 320x240
     14layer at (8,68) size 320x240
    1515  RenderFlexibleBox {DIV} at (0,0) size 320x240
    1616    RenderBlock {DIV} at (0,200) size 320x40
    17 layer at (13,271) size 310x30
     17layer at (13,273) size 310x30
    1818  RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC]
    19     RenderButton {INPUT} at (9,0) size 30x30
     19    RenderButton {BUTTON} at (9,0) size 30x30
    2020    RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659]
    2121      RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)]
    2222        RenderBlock {DIV} at (1,-2) size 105x12
    23           RenderBlock {DIV} at (-7,0) size 13x12 [color=#FFFFFF]
     23          RenderBlock {DIV} at (-7,0) size 12x12 [color=#FFFFFF]
    2424    RenderBlock {DIV} at (157,0) size 74x30 [color=#FFFFFF]
    2525      RenderText {#text} at (0,7) size 74x15
    2626        text run at (0,7) width 74: "00:00 / 00:06"
    27     RenderButton {INPUT} at (239,0) size 30x30
    28     RenderButton {INPUT} at (271,0) size 30x30
     27    RenderButton {BUTTON} at (239,0) size 30x30
     28    RenderFlexibleBox {DIV} at (271,0) size 30x30
     29      RenderButton {BUTTON} at (0,0) size 30x30
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r243588 r243589  
     12019-03-26  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] Sound loop with Google Hangouts and WhatsApp notifications
     4        https://bugs.webkit.org/show_bug.cgi?id=189471
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        The media duration is now cached (again). The loop issue was
     9        triggered by the previous version of the code returning positive
     10        infinite duration in didEnd(), followed by the timeupdate event
     11        propagation that would trick the HTMLMediaElement into a new call
     12        to play(). Now the cached duration is updated to current position
     13        at EOS (for forward playback direction only), so the media element
     14        no longer triggers a new play call for those cases.
     15
     16        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     17        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
     18        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
     19        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
     20        (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
     21        (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
     22        (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
     23        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
     24        (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
     25        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     26        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
     27        (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
     28
    1292019-03-22  Alicia Boya García  <aboya@igalia.com>
    230
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r242877 r243589  
    137137    , m_bufferingPercentage(0)
    138138    , m_cachedPosition(MediaTime::invalidTime())
     139    , m_cachedDuration(MediaTime::invalidTime())
    139140    , m_canFallBackToLastFinishedSeekPosition(false)
    140141    , m_changingRate(false)
     
    143144    , m_isEndReached(false)
    144145    , m_isStreaming(false)
    145     , m_durationAtEOS(MediaTime::invalidTime())
    146146    , m_paused(true)
    147147    , m_playbackRate(1)
     
    311311    m_player->readyStateChanged();
    312312    m_volumeAndMuteInitialized = false;
    313     m_durationAtEOS = MediaTime::invalidTime();
    314313    m_hasTaintedOrigin = WTF::nullopt;
    315314
     
    367366MediaTime MediaPlayerPrivateGStreamer::playbackPosition() const
    368367{
     368    GST_TRACE_OBJECT(pipeline(), "isEndReached: %s, seeking: %s, seekTime: %s", boolForPrinting(m_isEndReached), boolForPrinting(m_seeking), m_seekTime.toString().utf8().data());
    369369    if (m_isEndReached && m_seeking)
    370370        return m_seekTime;
     
    373373    static const Seconds positionCacheThreshold = 200_ms;
    374374    Seconds now = WTF::WallTime::now().secondsSinceEpoch();
    375     if (m_lastQueryTime && (now - m_lastQueryTime.value()) < positionCacheThreshold && m_cachedPosition.isValid())
     375    if (m_lastQueryTime && (now - m_lastQueryTime.value()) < positionCacheThreshold && m_cachedPosition.isValid()) {
     376        GST_TRACE_OBJECT(pipeline(), "Returning cached position: %s", m_cachedPosition.toString().utf8().data());
    376377        return m_cachedPosition;
     378    }
    377379
    378380    m_lastQueryTime = now;
     
    385387    gst_query_unref(query);
    386388
    387     GST_TRACE_OBJECT(pipeline(), "Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
     389    GST_TRACE_OBJECT(pipeline(), "Position %" GST_TIME_FORMAT ", canFallBackToLastFinishedSeekPosition: %s", GST_TIME_ARGS(position), boolForPrinting(m_canFallBackToLastFinishedSeekPosition));
    388390
    389391    MediaTime playbackPosition = MediaTime::zeroTime();
     
    487489}
    488490
     491MediaTime MediaPlayerPrivateGStreamer::platformDuration() const
     492{
     493    GST_TRACE_OBJECT(pipeline(), "errorOccured: %s, pipeline state: %s", boolForPrinting(m_errorOccured), gst_element_state_get_name(GST_STATE(m_pipeline.get())));
     494    if (m_errorOccured)
     495        return MediaTime::invalidTime();
     496
     497    // The duration query would fail on a not-prerolled pipeline.
     498    if (GST_STATE(m_pipeline.get()) < GST_STATE_PAUSED)
     499        return MediaTime::invalidTime();
     500
     501    int64_t duration = 0;
     502    if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &duration) || !GST_CLOCK_TIME_IS_VALID(duration)) {
     503        GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data());
     504        return MediaTime::positiveInfiniteTime();
     505    }
     506
     507    GST_LOG_OBJECT(pipeline(), "Duration: %" GST_TIME_FORMAT, GST_TIME_ARGS(duration));
     508    return MediaTime(duration, GST_SECOND);
     509}
     510
    489511MediaTime MediaPlayerPrivateGStreamer::durationMediaTime() const
     512{
     513    GST_TRACE_OBJECT(pipeline(), "Cached duration: %s", m_cachedDuration.toString().utf8().data());
     514    if (m_cachedDuration.isValid())
     515        return m_cachedDuration;
     516
     517    MediaTime duration = platformDuration();
     518    if (!duration || duration.isInvalid())
     519        return MediaTime::zeroTime();
     520
     521    m_cachedDuration = duration;
     522
     523    return m_cachedDuration;
     524}
     525
     526MediaTime MediaPlayerPrivateGStreamer::currentMediaTime() const
    490527{
    491528    if (!m_pipeline || m_errorOccured)
    492529        return MediaTime::invalidTime();
    493530
    494     if (m_durationAtEOS.isValid())
    495         return m_durationAtEOS;
    496 
    497     // The duration query would fail on a not-prerolled pipeline.
    498     if (GST_STATE(m_pipeline.get()) < GST_STATE_PAUSED)
    499         return MediaTime::positiveInfiniteTime();
    500 
    501     gint64 timeLength = 0;
    502 
    503     if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &timeLength) || !GST_CLOCK_TIME_IS_VALID(timeLength)) {
    504         GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data());
    505         return MediaTime::positiveInfiniteTime();
    506     }
    507 
    508     GST_LOG("Duration: %" GST_TIME_FORMAT, GST_TIME_ARGS(timeLength));
    509 
    510     return MediaTime(timeLength, GST_SECOND);
    511     // FIXME: handle 3.14.9.5 properly
    512 }
    513 
    514 MediaTime MediaPlayerPrivateGStreamer::currentMediaTime() const
    515 {
    516     if (!m_pipeline || m_errorOccured)
    517         return MediaTime::invalidTime();
    518 
     531    GST_TRACE_OBJECT(pipeline(), "seeking: %s, seekTime: %s", boolForPrinting(m_seeking), m_seekTime.toString().utf8().data());
    519532    if (m_seeking)
    520533        return m_seekTime;
     
    21862199    m_cachedPosition = MediaTime::invalidTime();
    21872200    MediaTime now = currentMediaTime();
    2188     if (now > MediaTime { } && now <= durationMediaTime())
     2201    if (now > MediaTime::zeroTime() && !m_seeking) {
     2202        m_cachedDuration = now;
    21892203        m_player->durationChanged();
     2204    }
    21902205
    21912206    m_isEndReached = true;
    2192     timeChanged();
    21932207
    21942208    if (!m_player->client().mediaPlayerIsLooping()) {
    21952209        m_paused = true;
    2196         m_durationAtEOS = durationMediaTime();
    21972210        changePipelineState(GST_STATE_READY);
    21982211        m_downloadFinished = false;
    21992212    }
     2213    timeChanged();
    22002214}
    22012215
     
    22032217{
    22042218    MediaTime previousDuration = durationMediaTime();
    2205 
    2206     // FIXME: Check if this method is still useful, because it's not doing its work at all
    2207     // since bug #159458 removed a cacheDuration() call here.
     2219    m_cachedDuration = MediaTime::invalidTime();
    22082220
    22092221    // Avoid emiting durationchanged in the case where the previous
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r239427 r243589  
    9292    bool seeking() const override;
    9393
     94    MediaTime platformDuration() const;
    9495    MediaTime durationMediaTime() const override;
    9596    MediaTime currentMediaTime() const override;
     
    188189
    189190protected:
    190     void cacheDuration();
    191 
    192191    bool m_buffering;
    193192    int m_bufferingPercentage;
    194193    mutable MediaTime m_cachedPosition;
     194    mutable MediaTime m_cachedDuration;
    195195    bool m_canFallBackToLastFinishedSeekPosition;
    196196    bool m_changingRate;
     
    199199    mutable bool m_isEndReached;
    200200    mutable bool m_isStreaming;
    201     mutable MediaTime m_durationAtEOS;
    202201    bool m_paused;
    203202    float m_playbackRate;
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp

    r242451 r243589  
    783783        m_isEndReached = true;
    784784        m_cachedPosition = m_mediaTimeDuration;
    785         m_durationAtEOS = m_mediaTimeDuration;
    786785        m_player->timeChanged();
    787786    }
Note: See TracChangeset for help on using the changeset viewer.