[gst-devel] trouble seeking in local files

Soren Harward stharward at gmail.com
Sat Aug 16 07:44:22 CEST 2008


I need some help figuring out seeking.  I've been writing a small
command-line player to learn GStreamer programming, and have hit a
total wall trying to figure out seeking.  I'm setting up a pipeline as
follows:

filesrc -> decodebin -> audioconvert -> audioresample -> alsasink

It plays files just fine.  But then I add the following after the
pipeline is set up:

    gst_element_set_state(pipeline, GST_STATE_PAUSED);
    if (!gst_element_seek_simple(pipeline, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH, 3e10)) {
        g_printerr("simple seek failed\n");
    }
    gst_element_set_state(pipeline, GST_STATE_PLAYING);

The seek fails and the file starts playing from the beginning.  I've
tried all permutations of seek flags, I've tried the more advanced
gst_element_seek, and nothing I've tried has worked.  I'm attaching my
full source code.  Could someone please give me a hand here?  Thanks.

-- 
Soren Harward
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-play.c
Type: application/octet-stream
Size: 3146 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080816/35c35d82/attachment.obj>


More information about the gstreamer-devel mailing list