seeking is failing - gst_element_seek

Rossana Guerra guerra.rossana at gmail.com
Sat Feb 25 22:06:10 PST 2012


Hello, me again, I did a "player" for a playlist of avi files  with
the following pipeline and it works fine:

                          decodebin2 --- queueV --- ffmpeg-colorspace
--- videoscale ---- autovideosink
                          |
fliescr --- avidemux
                          |
                          decodebin2 -- queueA -- audioconvert ---- alsasink


I need to start playing the first video of the playlist with a seek,
ie: the first video should begin at certain position given by the seek
event


So this is the code for the seek:

// handler errors and setting netx file of the playlist
// here all assembling for the pipeline

g_object_set (G_OBJECT (source), "location",playlist[cont], NULL); //
setting the first video of the playlist
gst_element_set_state (pipeline, GST_STATE_PLAYING);

if (!gst_element_seek (GST_ELEMENT(pipeline), 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");}

The "seek failed" message is thrown, I applied the seek to the
avidemux insted also, but the it didn't work either.
Since the seek failed, the video starts from the begining dismissing
the seek time.

What's wrong? where do I put this code?

Thanks so much, cheers!

Rossana


More information about the gstreamer-devel mailing list