Commit e9ffc86d authored by eric@webkit.org's avatar eric@webkit.org

2009-11-02 Philippe Normand <pnormand@igalia.com>

        Reviewed by Jan Alonzo.

        [GTK] Failing media/video-played-reset.html
        https://bugs.webkit.org/show_bug.cgi?id=30589

        new m_seekTime attribute to keep track of the seek position

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::currentTime):
        (WebCore::MediaPlayerPrivate::seek):
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6dd8adca
2009-11-02 Philippe Normand <pnormand@igalia.com>
Reviewed by Jan Alonzo.
[GTK] Failing media/video-played-reset.html
https://bugs.webkit.org/show_bug.cgi?id=30589
new m_seekTime attribute to keep track of the seek position
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivate::currentTime):
(WebCore::MediaPlayerPrivate::seek):
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
2009-11-02 Xan Lopez <xlopez@igalia.com>
Reviewed by Jan Alonzo.
......@@ -136,6 +136,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
, m_playBin(0)
, m_videoSink(0)
, m_source(0)
, m_seekTime(0)
, m_endTime(numeric_limits<float>::infinity())
, m_networkState(MediaPlayer::Empty)
, m_readyState(MediaPlayer::HaveNothing)
......@@ -225,6 +226,9 @@ float MediaPlayerPrivate::currentTime() const
if (m_errorOccured)
return 0;
if (m_seeking)
return m_seekTime;
float ret = 0.0;
GstQuery* query = gst_query_new_position(GST_FORMAT_TIME);
......@@ -264,8 +268,10 @@ void MediaPlayerPrivate::seek(float time)
GST_SEEK_TYPE_SET, sec,
GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
LOG_VERBOSE(Media, "Seek to %f failed", time);
else
else {
m_seeking = true;
m_seekTime = sec;
}
}
void MediaPlayerPrivate::setEndTime(float time)
......
......@@ -29,6 +29,7 @@
#include <cairo.h>
#include <glib.h>
#include <gst/gst.h>
typedef struct _WebKitVideoSink WebKitVideoSink;
typedef struct _GstBuffer GstBuffer;
......@@ -124,6 +125,7 @@ namespace WebCore {
GstElement* m_playBin;
GstElement* m_videoSink;
GstElement* m_source;
GstClockTime m_seekTime;
float m_endTime;
bool m_isEndReached;
MediaPlayer::NetworkState m_networkState;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment