Title: [236186] releases/WebKitGTK/webkit-2.22
- Revision
- 236186
- Author
- [email protected]
- Date
- 2018-09-19 06:19:14 -0700 (Wed, 19 Sep 2018)
Log Message
Merge r235846 - [GStreamer] Several media related tests timing out around the same revision
https://bugs.webkit.org/show_bug.cgi?id=189349
Reviewed by Carlos Garcia Campos.
Source/WebCore:
The timeouts were happening because the `ended` event was no
longer properly emitted. The change in playbackPosition also
ensures `timeupdate` event remains emitted in a... timely manner.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
Reduce the position cache threshold to 200ms, which is a value
slightly lower than the 250ms defined in HTMLMediaElement.
(WebCore::MediaPlayerPrivateGStreamer::didEnd): Reset the cached
position value to ensure the following query will most likely
return the same value as reported by the duration query.
LayoutTests:
* platform/gtk/TestExpectations: Unflag Timeout from now-unaffected tests.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog (236185 => 236186)
--- releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog 2018-09-19 13:19:07 UTC (rev 236185)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog 2018-09-19 13:19:14 UTC (rev 236186)
@@ -1,3 +1,12 @@
+2018-09-10 Philippe Normand <[email protected]>
+
+ [GStreamer] Several media related tests timing out around the same revision
+ https://bugs.webkit.org/show_bug.cgi?id=189349
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/gtk/TestExpectations: Unflag Timeout from now-unaffected tests.
+
2018-09-10 Rob Buis <[email protected]>
XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (236185 => 236186)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2018-09-19 13:19:07 UTC (rev 236185)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2018-09-19 13:19:14 UTC (rev 236186)
@@ -1,3 +1,22 @@
+2018-09-10 Philippe Normand <[email protected]>
+
+ [GStreamer] Several media related tests timing out around the same revision
+ https://bugs.webkit.org/show_bug.cgi?id=189349
+
+ Reviewed by Carlos Garcia Campos.
+
+ The timeouts were happening because the `ended` event was no
+ longer properly emitted. The change in playbackPosition also
+ ensures `timeupdate` event remains emitted in a... timely manner.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
+ Reduce the position cache threshold to 200ms, which is a value
+ slightly lower than the 250ms defined in HTMLMediaElement.
+ (WebCore::MediaPlayerPrivateGStreamer::didEnd): Reset the cached
+ position value to ensure the following query will most likely
+ return the same value as reported by the duration query.
+
2018-09-10 Rob Buis <[email protected]>
XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (236185 => 236186)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-09-19 13:19:07 UTC (rev 236185)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-09-19 13:19:14 UTC (rev 236186)
@@ -164,7 +164,6 @@
, m_readyTimerHandler(RunLoop::main(), this, &MediaPlayerPrivateGStreamer::readyTimerFired)
, m_totalBytes(0)
, m_preservesPitch(false)
- , m_lastQuery(-1)
{
#if USE(GLIB)
m_readyTimerHandler.setPriority(G_PRIORITY_DEFAULT_IDLE);
@@ -344,11 +343,13 @@
if (m_isEndReached && m_seeking)
return m_seekTime;
- double now = WTF::WallTime::now().secondsSinceEpoch().milliseconds();
- if (m_lastQuery > -1 && ((now - m_lastQuery) < 300) && m_cachedPosition.isValid())
+ // This constant should remain lower than HTMLMediaElement's maxTimeupdateEventFrequency.
+ static const Seconds positionCacheThreshold = 200_ms;
+ Seconds now = WTF::WallTime::now().secondsSinceEpoch();
+ if (m_lastQueryTime && (now - m_lastQueryTime.value()) < positionCacheThreshold && m_cachedPosition.isValid())
return m_cachedPosition;
- m_lastQuery = now;
+ m_lastQueryTime = now;
// Position is only available if no async state change is going on and the state is either paused or playing.
gint64 position = GST_CLOCK_TIME_NONE;
@@ -2149,6 +2150,7 @@
// Synchronize position and duration values to not confuse the
// HTMLMediaElement. In some cases like reverse playback the
// position is not always reported as 0 for instance.
+ m_cachedPosition = MediaTime::invalidTime();
MediaTime now = currentMediaTime();
if (now > MediaTime { } && now <= durationMediaTime())
m_player->durationChanged();
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (236185 => 236186)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2018-09-19 13:19:07 UTC (rev 236185)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2018-09-19 13:19:14 UTC (rev 236186)
@@ -257,7 +257,7 @@
mutable unsigned long long m_totalBytes;
URL m_url;
bool m_preservesPitch;
- mutable double m_lastQuery;
+ mutable std::optional<Seconds> m_lastQueryTime;
bool m_isLegacyPlaybin;
#if GST_CHECK_VERSION(1, 10, 0)
GRefPtr<GstStreamCollection> m_streamCollection;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes