[gst-devel] RE : Replay of.wav file

Albert Costa costa_albert at yahoo.fr
Wed May 7 09:32:26 CEST 2008


Hi,
  I'm not sure this is possible from command line. But if you write your own application and create and handle your pipeline yourself, here are the guidelines:
   
  When you create and start your pipeline, connect a signal for the "segment done" message like this:
  g_signal_connect (commonBus, "message::segment-done", (GCallback) reloop_call, pipeline);
   
  In your callback, check the right message and then send an event to get back to beginning of file:
  static void reloop_call (GstBus * bus, GstMessage * message, GstElement * pipeline)
  {
  GstEvent* seek_event;
  switch (message->type) {
  
  case GST_MESSAGE_SEGMENT_DONE:
  g_log(G_LOG_DOMAIN_VSA, G_LOG_LEVEL_INFO, "Segment done message received");
  seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
  (GstSeekFlags) (GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH),
  GST_SEEK_TYPE_SET, (GstClockTime) 0,
  GST_SEEK_TYPE_SET, -1);
  gst_element_send_event (pipeline, seek_event);
  break;
  default:
  g_assert_not_reached ();
  break;
  }
  }
  
Regards,
  Al
  
Sreejesh <sreejesh at multitech.co.in> a écrit :
                  Hi All,
   
  How can I continuously replay a .wav file.
  I have the following pipeline to play a .wav file.
   
  Gst-launch filesrc location=myaudio.wav ! decodebin ! osssink
   
  The above pipeline stops after getting EOS. But I wanted to repeat the playback.
   
  Please help.
   
  Thanks & Regards
  Sreejesh R B


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


 __________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080507/c009fed8/attachment.htm>


More information about the gstreamer-devel mailing list