[gst-devel] filesrc rewind

Jérémy SIMON jesimon at libertysurf.fr
Fri Mar 7 04:55:25 CET 2003


> <snip>
>   GstEvent *s_event;
>   //guint8   prev_state;
>   GstPad *src;
> 
>   g_print("have eos, seeking\n");
>   s_event = gst_event_new_seek (GST_FORMAT_TIME |
>                                       GST_SEEK_METHOD_SET |
>                                       GST_SEEK_FLAG_FLUSH, 0);
> 
>   src = gst_element_get_pad( GST_ELEMENT(element) , "src" );
>   if (src != NULL){
>     g_print("src is not NULL\n");
>     gst_event_ref (s_event);
>     gst_pad_send_event ( src, s_event);
>     //gst_element_send_event ( GST_ELEMENT(element), s_event); 
>     // also tried this ^
>   }
>   
>   gst_element_set_state(GST_ELEMENT(element), GST_STATE_PLAYING);

What is the element ? the mp3 decoder ? 
Try to send the event to the filesrc element.
I'm not sure you have to ref the event

hope it's help

--
Jeremy SIMON





More information about the gstreamer-devel mailing list