Changeset 243976 in webkit
- Timestamp:
- Apr 8, 2019, 3:14:20 AM (7 years ago)
- Location:
- releases/WebKitGTK/webkit-2.24/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (modified) (3 diffs)
-
platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (modified) (1 diff)
-
platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog
r243975 r243976 1 2019-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 1 27 2019-03-18 Philippe Normand <pnormand@igalia.com> 2 28 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r243975 r243976 1388 1388 } 1389 1389 } 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); 1390 1393 } else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) { 1391 1394 if (WEBKIT_IS_WEB_SRC(m_source.get())) … … 1717 1720 return false; 1718 1721 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 } 1721 1728 1722 1729 if (UNLIKELY(!m_pipeline || !durationMediaTime() || (!isMediaSource() && !totalBytes()))) … … 1726 1733 bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress; 1727 1734 m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded; 1728 GST_LOG ("didLoadingProgress: %s", toString(didLoadingProgress).utf8().data());1735 GST_LOG_OBJECT(pipeline(), "didLoadingProgress: %s", boolForPrinting(didLoadingProgress)); 1729 1736 return didLoadingProgress; 1730 1737 } -
releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r243589 r243976 288 288 virtual bool isMediaSource() const { return false; } 289 289 290 uint64_t m_networkReadPosition { 0 }; 291 mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 }; 292 290 293 Optional<bool> m_hasTaintedOrigin { WTF::nullopt }; 291 294 }; -
releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r243975 r243976 979 979 priv->requestedPosition = newPosition; 980 980 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))); 981 983 982 984 uint64_t newSize = 0;
Note:
See TracChangeset
for help on using the changeset viewer.