Title: [235846] trunk
- Revision
- 235846
- Author
- [email protected]
- Date
- 2018-09-10 02:10:27 -0700 (Mon, 10 Sep 2018)
Log Message
[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: trunk/LayoutTests/ChangeLog (235845 => 235846)
--- trunk/LayoutTests/ChangeLog 2018-09-10 08:57:41 UTC (rev 235845)
+++ trunk/LayoutTests/ChangeLog 2018-09-10 09:10:27 UTC (rev 235846)
@@ -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: trunk/LayoutTests/platform/gtk/TestExpectations (235845 => 235846)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2018-09-10 08:57:41 UTC (rev 235845)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2018-09-10 09:10:27 UTC (rev 235846)
@@ -1527,7 +1527,7 @@
# Some media fragment tests are flaky
webkit.org/b/132248 media/media-fragments/TC0001.html [ Timeout Pass ]
webkit.org/b/132248 media/media-fragments/TC0002.html [ Crash Pass ]
-webkit.org/b/132248 media/media-fragments/TC0004.html [ Timeout Crash Pass ]
+webkit.org/b/132248 media/media-fragments/TC0004.html [ Crash Pass ]
webkit.org/b/132248 media/media-fragments/TC0005.html [ Failure Crash Pass ]
webkit.org/b/132248 media/media-fragments/TC0006.html [ Failure Pass ]
webkit.org/b/132248 media/media-fragments/TC0009.html [ Failure Pass ]
@@ -1534,7 +1534,6 @@
webkit.org/b/132248 media/media-fragments/TC0011.html [ Failure Pass ]
webkit.org/b/132248 media/media-fragments/TC0014.html [ Failure Pass ]
webkit.org/b/132248 media/media-fragments/TC0015.html [ Failure Crash Pass ]
-webkit.org/b/132248 media/media-fragments/TC0017.html [ Timeout Pass ]
webkit.org/b/134574 media/media-fragments/TC0024.html [ Failure Timeout Pass ]
webkit.org/b/132248 media/media-fragments/TC0035.html [ Failure Pass ]
webkit.org/b/132248 media/media-fragments/TC0036.html [ Failure Pass ]
@@ -1984,7 +1983,7 @@
webkit.org/b/186678 fast/mediastream/change-tracks-media-stream-being-played.html [ Crash Pass ]
-webkit.org/b/186679 media/video-currentTime-delay.html [ Timeout Crash Pass ]
+webkit.org/b/186679 media/video-currentTime-delay.html [ Crash Pass ]
webkit.org/b/186750 imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.https.html [ Pass Failure ]
webkit.org/b/186750 imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2_short_long.https.html [ Pass Failure ]
@@ -2044,16 +2043,6 @@
webkit.org/b/189339 compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html [ ImageOnlyFailure Pass ]
-webkit.org/b/189340 webaudio/silence-after-playback.html [ Failure Timeout Pass ]
-
-webkit.org/b/189341 http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html [ Timeout Pass ]
-
-webkit.org/b/189342 media/media-fullscreen-return-to-inline.html [ Timeout Pass ]
-
-webkit.org/b/189346 media/media-ended.html [ Timeout Pass ]
-
-webkit.org/b/189348 media/video-currentTime-set.html [ Timeout Pass ]
-
#////////////////////////////////////////////////////////////////////////////////////////
# End of Flaky tests
#////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/Source/WebCore/ChangeLog (235845 => 235846)
--- trunk/Source/WebCore/ChangeLog 2018-09-10 08:57:41 UTC (rev 235845)
+++ trunk/Source/WebCore/ChangeLog 2018-09-10 09:10:27 UTC (rev 235846)
@@ -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: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (235845 => 235846)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-09-10 08:57:41 UTC (rev 235845)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-09-10 09:10:27 UTC (rev 235846)
@@ -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: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (235845 => 235846)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2018-09-10 08:57:41 UTC (rev 235845)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h 2018-09-10 09:10:27 UTC (rev 235846)
@@ -258,7 +258,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