[gst-devel] Seek howto ?

Benjamin Otte in7y118 at public.uni-hamburg.de
Fri Jun 25 06:14:01 CEST 2004


Quoting "Ronald S. Bultje" <R.S.Bultje at students.uu.nl>:

> 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,
>       ns);
>   return gst_element_send_event (audiosink, event);  
> }
> 
Applciations should never need to touch events. And because of this, 
application writers should use this function:

gst_element_seek (audiosink, GST_SEEK_METHOD_SET | GST_FORMAT_TIME, ns);


Benjamin




More information about the gstreamer-devel mailing list