[gst-devel] Seek howto ?
pochini at shiny.it
Fri Jun 25 03:45:07 CEST 2004
On 24-Jun-2004 Ronald S. Bultje wrote:
> On Thu, 2004-06-24 at 23:04, Giuliano Pochini wrote:
>> I'm experimenting with gstreamer and variousaudio file formats. I have
>> problems with seeking. The tutorial says nothing about it, so I tried to use
>> the code in gst-plugins-0.8.1/examples/seeking. It works, but I cannot find
>> a generic way to seek in any file. The example program builds a "seekable"
>> list for each supported format. How can I know what is the element(s) I have
>> to send the seek event to ? Why the event has to be sent to the pads of
>> some elements instead of the element itself ?
> For a pipeline filesrc ! spider ! audiosink, do:
> static gboolean
> seek (guint64 ns)
> GstEvent *event;
> GstElement *audiosink = ..;
> event = gst_event_new_seek (GST_SEEK_METHOD_SET | GST_FORMAT_TIME,
> return gst_element_send_event (audiosink, event);
Are you sure ? I cannot test it now, but I couldn't seek
at all when the spider is in the chain. I tried to send
the event to all the elements without success.
More information about the gstreamer-devel