From: Jiyeon Kim Date: Fri, 10 May 2013 04:01:24 +0000 (+0900) Subject: Fix issue that timeline goes back to 00:00 during pressing FF button repeatly X-Git-Tag: submit/tizen_2.1/20130514.045449~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00ede0f7183a638b8e04adb15a6cfb24e17b0e6b;p=platform%2Fframework%2Fweb%2Fwebkit-efl.git Fix issue that timeline goes back to 00:00 during pressing FF button repeatly [Title] Fix issue that timeline goes back to 00:00 during pressing FF button repeatly [Problem] N_SE-38067 [Cause] playbackPosition() method return 0.0f when error occured [Solution] Keep cached time value in playbackPosition method and return cached time value when error occured Change-Id: Ia2ea72dbf744f125dcad5d4e66ecd4542b6e4ee7 --- diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index d8b2a89..050cbc0 100755 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -510,6 +510,10 @@ void MediaPlayerPrivateGStreamer::commitLoad() float MediaPlayerPrivateGStreamer::playbackPosition() const { +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + static float cachedTime; +#endif + if (m_isEndReached) { // Position queries on a null pipeline return 0. If we're at // the end of the stream the pipeline is null but we want to @@ -527,7 +531,11 @@ float MediaPlayerPrivateGStreamer::playbackPosition() const if (!gst_element_query(m_playBin.get(), query)) { LOG_MEDIA_MESSAGE("Position query failed..."); gst_query_unref(query); +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + return cachedTime; +#else return ret; +#endif } gint64 position; @@ -538,6 +546,9 @@ float MediaPlayerPrivateGStreamer::playbackPosition() const if (position != static_cast(GST_CLOCK_TIME_NONE)) ret = static_cast(position) / GST_SECOND; +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + cachedTime = ret; +#endif LOG_MEDIA_MESSAGE("Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position)); gst_query_unref(query);