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

Changeset 243976 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 3:14:20 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r243140 - REGRESSION(r243058): [GStreamer] 3 tests now timing out
https://bugs.webkit.org/show_bug.cgi?id=195888

Reviewed by Xabier Rodriguez-Calvar.

A breaking change was introduced in r243058. Now on-disk-buffering
is disabled when the reported Content-Length is 0 or not present
at all. This broke the progress event logic in didLoadProgress()
because leading to progress events not being fired as expected.

The proposed solution is to make webkitwebsrc notify the player
every time the network process receives data from the network. So
the player can now easily determine if the load progressed by
checking the reported statistics.

No new tests, existing media tests cover this change.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::dataReceived):

Location:
releases/WebKitGTK/webkit-2.24/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r243975 r243976  
     12019-03-19  Philippe Normand  <pnormand@igalia.com>
     2
     3        REGRESSION(r243058): [GStreamer] 3 tests now timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=195888
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        A breaking change was introduced in r243058. Now on-disk-buffering
     9        is disabled when the reported Content-Length is 0 or not present
     10        at all. This broke the progress event logic in didLoadProgress()
     11        because leading to progress events not being fired as expected.
     12
     13        The proposed solution is to make webkitwebsrc notify the player
     14        every time the network process receives data from the network. So
     15        the player can now easily determine if the load progressed by
     16        checking the reported statistics.
     17
     18        No new tests, existing media tests cover this change.
     19
     20        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     21        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
     22        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
     23        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     24        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     25        (CachedResourceStreamingClient::dataReceived):
     26
    1272019-03-18  Philippe Normand  <pnormand@igalia.com>
    228
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r243975 r243976  
    13881388                }
    13891389            }
     1390        } else if (gst_structure_has_name(structure, "webkit-network-statistics")) {
     1391            if (gst_structure_get_uint64(structure, "read-position", &m_networkReadPosition))
     1392                GST_DEBUG_OBJECT(pipeline(), "Updated network read position %" G_GUINT64_FORMAT, m_networkReadPosition);
    13901393        } else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) {
    13911394            if (WEBKIT_IS_WEB_SRC(m_source.get()))
     
    17171720        return false;
    17181721
    1719     if (isLiveStream())
    1720         return true;
     1722    if (WEBKIT_IS_WEB_SRC(m_source.get())) {
     1723        GST_LOG_OBJECT(pipeline(), "Last network read position: %" G_GUINT64_FORMAT ", current: %" G_GUINT64_FORMAT, m_readPositionAtLastDidLoadingProgress, m_networkReadPosition);
     1724        bool didLoadingProgress = m_readPositionAtLastDidLoadingProgress != m_networkReadPosition;
     1725        m_readPositionAtLastDidLoadingProgress = m_networkReadPosition;
     1726        return didLoadingProgress;
     1727    }
    17211728
    17221729    if (UNLIKELY(!m_pipeline || !durationMediaTime() || (!isMediaSource() && !totalBytes())))
     
    17261733    bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
    17271734    m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
    1728     GST_LOG("didLoadingProgress: %s", toString(didLoadingProgress).utf8().data());
     1735    GST_LOG_OBJECT(pipeline(), "didLoadingProgress: %s", boolForPrinting(didLoadingProgress));
    17291736    return didLoadingProgress;
    17301737}
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r243589 r243976  
    288288    virtual bool isMediaSource() const { return false; }
    289289
     290    uint64_t m_networkReadPosition { 0 };
     291    mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 };
     292
    290293    Optional<bool> m_hasTaintedOrigin { WTF::nullopt };
    291294};
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r243975 r243976  
    979979        priv->requestedPosition = newPosition;
    980980    priv->readPosition = newPosition;
     981    gst_element_post_message(GST_ELEMENT_CAST(src), gst_message_new_element(GST_OBJECT_CAST(src),
     982        gst_structure_new("webkit-network-statistics", "read-position", G_TYPE_UINT64, priv->readPosition, nullptr)));
    981983
    982984    uint64_t newSize = 0;
Note: See TracChangeset for help on using the changeset viewer.