Seeking forward is not working

Rossana Guerra guerra.rossana at gmail.com
Fri Feb 24 23:08:00 PST 2012


Hello, my pipeline is very straightforward, a playbin2 for playing avi
video files.
I need it to do a seek at the start of the 'player'.
This is the code, according to the message, the seek is done, but not in
the place it should be. I want it to start at 15 seconds from its begining.
(I converted 15 seconds to nanoseconds and it didn't work either)

     gst_element_set_state (play, GST_STATE_PLAYING);

    gst_element_set_state (play, GST_STATE_PAUSED);
    if (!gst_element_seek (GST_ELEMENT(play), 1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH,
                        GST_SEEK_TYPE_SET, 15*GST_SECOND,
                         GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
        g_print ("Seek failed!\n");}
    else
        g_print ("Seek OK!\n");  // it seems it does the seek, but it
doesn't it plays the video from the begining.

What is wrong?, I see these line in many examples.
Thanks

Rossana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120225/6293f95d/attachment.htm>


More information about the gstreamer-devel mailing list