Title: [96311] trunk
Revision
96311
Author
ph...@webkit.org
Date
2011-09-29 01:07:19 -0700 (Thu, 29 Sep 2011)

Log Message

[GStreamer] 2 flaky media tests
https://bugs.webkit.org/show_bug.cgi?id=67407

Reviewed by Martin Robinson.

Workaround for GStreamer bug#639941. In GStreamer
0.10.35 basesink reports wrong duration in case of EOS and
negative playback rate. This workaround fixes two media tests,
media/video-timeupdate-reverse-play.html and
media/video-reverse-play-duration.html.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
(WebCore::MediaPlayerPrivateGStreamer::currentTime):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):

Modified Paths

Diff

Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (96310 => 96311)


--- trunk/LayoutTests/platform/gtk/test_expectations.txt	2011-09-29 08:03:31 UTC (rev 96310)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt	2011-09-29 08:07:19 UTC (rev 96311)
@@ -11,7 +11,6 @@
 
 BUGWK68536 : media/media-blocked-by-beforeload.html = PASS TEXT
 BUGWK68878 : media/video-playing-and-pause.html = PASS TEXT
-BUGWK67407 : media/video-timeupdate-reverse-play.html = PASS TEXT
 
 BUGWK68523 : svg/zoom/page/zoom-svg-through-object-with-auto-size.html = PASS TEXT
 BUGWK68523 : svg/zoom/page/zoom-svg-through-object-with-override-size.html = PASS TEXT

Modified: trunk/Source/WebCore/ChangeLog (96310 => 96311)


--- trunk/Source/WebCore/ChangeLog	2011-09-29 08:03:31 UTC (rev 96310)
+++ trunk/Source/WebCore/ChangeLog	2011-09-29 08:07:19 UTC (rev 96311)
@@ -1,5 +1,23 @@
 2011-09-29  Philippe Normand  <pnorm...@igalia.com>
 
+        [GStreamer] 2 flaky media tests
+        https://bugs.webkit.org/show_bug.cgi?id=67407
+
+        Reviewed by Martin Robinson.
+
+        Workaround for GStreamer bug#639941. In GStreamer
+        0.10.35 basesink reports wrong duration in case of EOS and
+        negative playback rate. This workaround fixes two media tests,
+        media/video-timeupdate-reverse-play.html and
+        media/video-reverse-play-duration.html.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
+        (WebCore::MediaPlayerPrivateGStreamer::currentTime):
+        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
+
+2011-09-29  Philippe Normand  <pnorm...@igalia.com>
+
         [GStreamer] fullscreen video pause/play fails
         https://bugs.webkit.org/show_bug.cgi?id=66936
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (96310 => 96311)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-09-29 08:03:31 UTC (rev 96310)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-09-29 08:07:19 UTC (rev 96311)
@@ -354,6 +354,8 @@
 
 void MediaPlayerPrivateGStreamer::prepareToPlay()
 {
+    m_isEndReached = false;
+
     if (m_delayingLoad) {
         m_delayingLoad = false;
         commitLoad();
@@ -412,6 +414,14 @@
     if (m_seeking)
         return m_seekTime;
 
+    // Workaround for
+    // https://bugzilla.gnome.org/show_bug.cgi?id=639941 In GStreamer
+    // 0.10.35 basesink reports wrong duration in case of EOS and
+    // negative playback rate. There's no upstream accepted patch for
+    // this bug yet, hence this temporary workaround.
+    if (m_isEndReached && m_playbackRate < 0)
+        return 0.0f;
+
     return playbackPosition();
 
 }
@@ -1325,6 +1335,8 @@
         m_player->durationChanged();
     }
 
+    m_isEndReached = true;
+
     gst_element_set_state(m_playBin, GST_STATE_PAUSED);
 
     timeChanged();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to