[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

philn at webkit.org philn at webkit.org
Thu Feb 4 21:29:07 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 7968dceaeca4e347e2469664e7005a3f85095085
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 27 08:24:37 2010 +0000

    2010-01-25  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Eric Seidel.
    
            [Gtk] media/video-reverse-play-duration.html fails on and off on Gtk buildbots
            https://bugs.webkit.org/show_bug.cgi?id=34086
    
            Cache media duration and fix didEnd() in case of reverse
            playback. When EOS was reached but in case of reverse playback the
            position is not always 0. So to not confuse the HTMLMediaElement
            we synchronize position and duration values.
    
            * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
            (WebCore::MediaPlayerPrivate::duration):
            (WebCore::MediaPlayerPrivate::updateStates):
            (WebCore::MediaPlayerPrivate::didEnd):
            (WebCore::MediaPlayerPrivate::durationChanged):
            * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
    
    2010-01-25  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Eric Seidel.
    
            [Gtk] media/video-reverse-play-duration.html fails on and off on Gtk buildbots
            https://bugs.webkit.org/show_bug.cgi?id=34086
    
            * platform/gtk/Skipped: Unskip fixed test.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 37a18bc..ed22bc2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-25  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Eric Seidel.
+
+        [Gtk] media/video-reverse-play-duration.html fails on and off on Gtk buildbots
+        https://bugs.webkit.org/show_bug.cgi?id=34086
+
+        * platform/gtk/Skipped: Unskip fixed test.
+
 2010-01-26  Daniel Bates  <dbates at webkit.org>
 
         Unreviewed. Made a minor typo when I added the test case fast/css/button-height.html
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 2e515c4..0babb4c 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5782,6 +5782,3 @@ svg/custom/use-instanceRoot-event-bubbling.xhtml
 
 # New failure after http://trac.webkit.org/changeset/53758
 scrollbars/scrollbar-middleclick-nopaste.html
-
-# https://bugs.webkit.org/show_bug.cgi?id=34086
-media/video-reverse-play-duration.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e2840d1..ecb990f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-01-25  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Eric Seidel.
+
+        [Gtk] media/video-reverse-play-duration.html fails on and off on Gtk buildbots
+        https://bugs.webkit.org/show_bug.cgi?id=34086
+
+        Cache media duration and fix didEnd() in case of reverse
+        playback. When EOS was reached but in case of reverse playback the
+        position is not always 0. So to not confuse the HTMLMediaElement
+        we synchronize position and duration values.
+
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::duration):
+        (WebCore::MediaPlayerPrivate::updateStates):
+        (WebCore::MediaPlayerPrivate::didEnd):
+        (WebCore::MediaPlayerPrivate::durationChanged):
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
 2010-01-27  Alexey Proskuryakov  <ap at apple.com>
 
         * WebCore.xcodeproj/project.pbxproj: Actually land the change to add ContainerNodeAlgorithms.h
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index 77b2a3d..ea35196 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -247,6 +247,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
     , m_playbackRate(1)
     , m_errorOccured(false)
     , m_volumeIdleId(-1)
+    , m_mediaDuration(0.0)
 {
     doGstInit();
 }
@@ -343,6 +344,9 @@ float MediaPlayerPrivate::duration() const
     if (m_errorOccured)
         return 0.0;
 
+    if (m_mediaDuration)
+        return m_mediaDuration;
+
     GstFormat timeFormat = GST_FORMAT_TIME;
     gint64 timeLength = 0;
 
@@ -665,6 +669,11 @@ void MediaPlayerPrivate::updateStates()
         if (state == GST_STATE_PLAYING) {
             m_readyState = MediaPlayer::HaveEnoughData;
             m_paused = false;
+            if (!m_mediaDuration) {
+                float newDuration = duration();
+                if (!isinf(newDuration))
+                    m_mediaDuration = newDuration;
+            }
         } else
             m_paused = true;
 
@@ -844,11 +853,27 @@ void MediaPlayerPrivate::timeChanged()
 
 void MediaPlayerPrivate::didEnd()
 {
+    // EOS was reached but in case of reverse playback the position is
+    // not always 0. So to not confuse the HTMLMediaElement we
+    // synchronize position and duration values.
+    float now = currentTime();
+    if (now > 0)
+        m_mediaDuration = now;
+    gst_element_set_state(m_playBin, GST_STATE_PAUSED);
+
     timeChanged();
 }
 
 void MediaPlayerPrivate::durationChanged()
 {
+    // Reset cached media duration
+    m_mediaDuration = 0;
+
+    // And re-cache it if possible.
+    float newDuration = duration();
+    if (!isinf(newDuration))
+        m_mediaDuration = newDuration;
+
     m_player->durationChanged();
 }
 
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
index f96ccf0..ec55b29 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
@@ -148,6 +148,7 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
             float m_playbackRate;
             bool m_errorOccured;
             guint m_volumeIdleId;
+            gfloat m_mediaDuration;
     };
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list