[gst-devel] Replay of.wav file
Sreejesh
sreejesh at multitech.co.in
Wed May 7 12:16:40 CEST 2008
Albert,
Thanks for the detailed help.
I will try this out.
Regards
Sreejesh R B
_____
From: Albert Costa [mailto:costa_albert at yahoo.fr]
Sent: Wednesday, May 07, 2008 1:02 PM
To: sreejesh at multitech.co.in; gstreamer-devel at lists.sourceforge.net
Subject: RE : [gst-devel] Replay of.wav file
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/javao
ne_______________________________________________
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/7e7db20d/attachment.htm>
More information about the gstreamer-devel
mailing list