Title: [243140] trunk/Source/WebCore
- Revision
- 243140
- Author
- ph...@webkit.org
- Date
- 2019-03-19 07:53:09 -0700 (Tue, 19 Mar 2019)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (243139 => 243140)
--- trunk/Source/WebCore/ChangeLog 2019-03-19 14:48:49 UTC (rev 243139)
+++ trunk/Source/WebCore/ChangeLog 2019-03-19 14:53:09 UTC (rev 243140)
@@ -1,3 +1,29 @@
+2019-03-19 Philippe Normand <pnorm...@igalia.com>
+
+ 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):
+
2019-03-19 Alicia Boya GarcĂa <ab...@igalia.com>
[MSE] Use tolerance in eraseBeginTime
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (243139 => 243140)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-03-19 14:48:49 UTC (rev 243139)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-03-19 14:53:09 UTC (rev 243140)
@@ -1374,6 +1374,9 @@
setDownloadBuffering();
}
}
+ } else if (gst_structure_has_name(structure, "webkit-network-statistics")) {
+ if (gst_structure_get_uint64(structure, "read-position", &m_networkReadPosition))
+ GST_DEBUG_OBJECT(pipeline(), "Updated network read position %" G_GUINT64_FORMAT, m_networkReadPosition);
} else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) {
if (WEBKIT_IS_WEB_SRC(m_source.get()))
if (const char* uri = gst_structure_get_string(structure, "uri"))
@@ -1703,8 +1706,12 @@
if (m_errorOccured || m_loadingStalled)
return false;
- if (isLiveStream())
- return true;
+ if (WEBKIT_IS_WEB_SRC(m_source.get())) {
+ GST_LOG_OBJECT(pipeline(), "Last network read position: %" G_GUINT64_FORMAT ", current: %" G_GUINT64_FORMAT, m_readPositionAtLastDidLoadingProgress, m_networkReadPosition);
+ bool didLoadingProgress = m_readPositionAtLastDidLoadingProgress != m_networkReadPosition;
+ m_readPositionAtLastDidLoadingProgress = m_networkReadPosition;
+ return didLoadingProgress;
+ }
if (UNLIKELY(!m_pipeline || !durationMediaTime() || (!isMediaSource() && !totalBytes())))
return false;
@@ -1712,7 +1719,7 @@
MediaTime currentMaxTimeLoaded = maxTimeLoaded();
bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
- GST_LOG("didLoadingProgress: %s", toString(didLoadingProgress).utf8().data());
+ GST_LOG_OBJECT(pipeline(), "didLoadingProgress: %s", boolForPrinting(didLoadingProgress));
return didLoadingProgress;
}
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (243139 => 243140)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2019-03-19 14:48:49 UTC (rev 243139)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2019-03-19 14:53:09 UTC (rev 243140)
@@ -288,6 +288,9 @@
#endif
virtual bool isMediaSource() const { return false; }
+ uint64_t m_networkReadPosition { 0 };
+ mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 };
+
Optional<bool> m_hasTaintedOrigin { WTF::nullopt };
};
}
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (243139 => 243140)
--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2019-03-19 14:48:49 UTC (rev 243139)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2019-03-19 14:53:09 UTC (rev 243140)
@@ -978,6 +978,8 @@
if (LIKELY (priv->requestedPosition == priv->readPosition))
priv->requestedPosition = newPosition;
priv->readPosition = newPosition;
+ gst_element_post_message(GST_ELEMENT_CAST(src), gst_message_new_element(GST_OBJECT_CAST(src),
+ gst_structure_new("webkit-network-statistics", "read-position", G_TYPE_UINT64, priv->readPosition, nullptr)));
uint64_t newSize = 0;
if (priv->haveSize && (newPosition > priv->size)) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes