Changeset 243140 in webkit
- Timestamp:
- Mar 19, 2019 7:53:09 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243138 r243140 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-19 Alicia Boya García <aboya@igalia.com> 2 28 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r243058 r243140 1375 1375 } 1376 1376 } 1377 } else if (gst_structure_has_name(structure, "webkit-network-statistics")) { 1378 if (gst_structure_get_uint64(structure, "read-position", &m_networkReadPosition)) 1379 GST_DEBUG_OBJECT(pipeline(), "Updated network read position %" G_GUINT64_FORMAT, m_networkReadPosition); 1377 1380 } else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) { 1378 1381 if (WEBKIT_IS_WEB_SRC(m_source.get())) … … 1704 1707 return false; 1705 1708 1706 if (isLiveStream()) 1707 return true; 1709 if (WEBKIT_IS_WEB_SRC(m_source.get())) { 1710 GST_LOG_OBJECT(pipeline(), "Last network read position: %" G_GUINT64_FORMAT ", current: %" G_GUINT64_FORMAT, m_readPositionAtLastDidLoadingProgress, m_networkReadPosition); 1711 bool didLoadingProgress = m_readPositionAtLastDidLoadingProgress != m_networkReadPosition; 1712 m_readPositionAtLastDidLoadingProgress = m_networkReadPosition; 1713 return didLoadingProgress; 1714 } 1708 1715 1709 1716 if (UNLIKELY(!m_pipeline || !durationMediaTime() || (!isMediaSource() && !totalBytes()))) … … 1713 1720 bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress; 1714 1721 m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded; 1715 GST_LOG ("didLoadingProgress: %s", toString(didLoadingProgress).utf8().data());1722 GST_LOG_OBJECT(pipeline(), "didLoadingProgress: %s", boolForPrinting(didLoadingProgress)); 1716 1723 return didLoadingProgress; 1717 1724 } -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r239427 r243140 289 289 virtual bool isMediaSource() const { return false; } 290 290 291 uint64_t m_networkReadPosition { 0 }; 292 mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 }; 293 291 294 Optional<bool> m_hasTaintedOrigin { WTF::nullopt }; 292 295 }; -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r243058 r243140 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.