Slider pointer does not move smoothly in html5 video
authorRobert Jadczak <r.jadczak@samsung.com>
Fri, 23 Aug 2013 10:18:09 +0000 (19:18 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 26 Aug 2013 04:15:06 +0000 (04:15 +0000)
[Title] Slider pointer does not move smoothly in html5 video
[Issue] N_SE-48572
[Problem] When gstreamer position query fails MediaPlayerPrivateGStreamer::playbackPosition() returns zero.
[Solution] Changing the returned value in case of gstreamer position query fails.

Change-Id: I3d1a849c809e6e48c3377498cad25987f5cafc67

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index c8b9784..656c2fc 100755 (executable)
@@ -533,7 +533,11 @@ float MediaPlayerPrivateGStreamer::playbackPosition() const
             return m_mediaDuration;
     }
 
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+    float ret = m_seekTime;
+#else
     float ret = 0.0f;
+#endif
 
     GstQuery* query = gst_query_new_position(GST_FORMAT_TIME);
     if (!gst_element_query(m_playBin.get(), query)) {
@@ -715,12 +719,15 @@ void MediaPlayerPrivateGStreamer::seek(float time)
 #endif
     } else {
         m_seeking = true;
-        m_seekTime = time;
 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
-        if (m_seekTime != m_mediaDuration)
+        if (time != m_mediaDuration)
             m_isEndReached = false;
-#endif
     }
+    m_seekTime = time;
+#else
+        m_seekTime = time;
+    }
+#endif
 }
 
 bool MediaPlayerPrivateGStreamer::paused() const
@@ -1762,6 +1769,9 @@ void MediaPlayerPrivateGStreamer::didEnd()
 
     m_isEndReached = true;
     timeChanged();
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+    m_seekTime = 0;
+#endif
 
     if (!m_player->mediaPlayerClient()->mediaPlayerIsLooping()) {
         m_paused = true;