<br><br><div class="gmail_quote">On Mon, Apr 27, 2009 at 10:52 PM, Guilherme <span dir="ltr"><<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I get the following error:<br>
<br>
guilherme@lap:~$ gst-launch -e<br>
Error initializing: Unknown option -e</blockquote><div>That's because it is only available from repository or prerelease tarballs. To use it, you'll need to update gstreamer.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Im gonna implement that.. using buffer and configuring bus to listen EOF.<br>
<br>
Tks for ur attention!<br>
<div class="im"><br>
Tks!<br>
<br>
-------------------<br>
<br>
Guilherme Longo<br>
Dept. Eng. da Computação<br>
Unaerp<br>
<br>
Linux User - #484927<br>
<br>
*Before Asking<br>
<a href="http://www.istf.com.br/?page=perguntas" target="_blank">http://www.istf.com.br/?page=perguntas</a><br>
<br>
!- I'd rather die on my feet than live on my knees -!<br>
<br>
<br>
<br>
</div><div class="im">thiagoss wrote:<br>
> I suppose you're finishing your application by pressing ctrl-c, I<br>
> don't know if wavenc cares about it, but this way you get no eos (if<br>
> wavenc cares about it to finish the file, this makes a difference).<br>
> You might want to set num-buffers property of audiotestsrc and listen<br>
> for EOS messages from the bus and quit the mainloop when it happens.<br>
><br>
> Btw, what was the problem with gst-launch -e ?<br>
><br>
> On Mon, Apr 27, 2009 at 7:42 PM, Guilherme <<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a>>> wrote:<br>
><br>
> Thiago, I did it before and all I get is a cracked sound.<br>
><br>
> Pretty weird.<br>
><br>
> Have a look what I was doing before:<br>
><br>
><br>
><br>
><br>
> #include<gst/gst.h><br>
> #include<glib.h><br>
><br>
> static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer data);<br>
><br>
> int main(int argc, char *argv[])<br>
> {<br>
> GMainLoop *loop;<br>
><br>
> GstElement *pipeline, *source, *audioconvert, *wavenc, *filesink;<br>
> GstBus *bus;<br>
><br>
> gst_init(&argc, &argv);<br>
><br>
> loop = g_main_loop_new (NULL, FALSE);<br>
><br>
> /*creating elements*/<br>
> pipeline = gst_pipeline_new ("audio-player");<br>
> source = gst_element_factory_make ("audiotestsrc",<br>
> "file-source");<br>
> //audioconvert = gst_element_factory_make ("audioconvert",<br>
> "audio-conversor");<br>
> wavenc = gst_element_factory_make ("wavenc",<br>
> "wave-enc");<br>
> filesink = gst_element_factory_make ("filesink",<br>
> "audio-output");<br>
><br>
> if (!pipeline || !source || !audioconvert|| !wavenc || !filesink) {<br>
> g_printerr ("One element could not be created. Exiting.\n");<br>
> return -1;<br>
> }<br>
><br>
> * g_object_set (G_OBJECT (filesink), "location", "foo.wav", NULL);*<br>
><br>
> /*set-up the pipeline*/<br>
><br>
> /*message handler*/<br>
> bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));<br>
> gst_bus_add_watch (bus, bus_call, loop);<br>
> gst_object_unref (bus);<br>
><br>
> /*colocar todos elementos na pipeline*/<br>
> gst_bin_add_many (GST_BIN (pipeline), source, wavenc, filesink,<br>
> NULL);<br>
><br>
> /*Linkar elementos*/<br>
> //gst_element_link ();<br>
> gst_element_link_many (source, wavenc, filesink, NULL);<br>
> //g_signal_connect (demuxer, "pad-added", G_CALLBACK<br>
> (on_pad_added),<br>
> decoder);<br>
><br>
> /* set pipeline playing status */<br>
> g_print ("Running...\n");<br>
> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>
><br>
> /*iterate*/<br>
> g_print ("Recording\n");<br>
> g_main_loop_run (loop);<br>
><br>
> /* Out of the main loop, clean up nicely */<br>
> g_print ("Returned, stopping playback\n");<br>
> gst_element_set_state (pipeline, GST_STATE_NULL);<br>
><br>
> g_print ("Deleting pipeline\n");<br>
> gst_object_unref (GST_OBJECT (pipeline));<br>
><br>
> return 0;<br>
> }<br>
><br>
> static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer<br>
> data) {<br>
><br>
> return TRUE;<br>
> }<br>
><br>
><br>
><br>
> ------------------------------------------------------------------------------<br>
> Register Now & Save for Velocity, the Web Performance & Operations<br>
> Conference from O'Reilly Media. Velocity features a full day of<br>
> expert-led, hands-on workshops and two days of sessions from industry<br>
> leaders in dedicated Performance & Operations tracks. Use code<br>
> vel09scf<br>
> and Save an extra 15% before 5/3. <a href="http://p.sf.net/sfu/velocityconf" target="_blank">http://p.sf.net/sfu/velocityconf</a><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
</div></div>> <mailto:<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>><br>
<div class="im">> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Thiago Sousa Santos<br>
><br>
> Embedded Systems and Pervasive Computing Lab (Embedded)<br>
> Center of Electrical Engineering and Informatics (CEEI)<br>
> Federal University of Campina Grande (UFCG)<br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> ------------------------------------------------------------------------------<br>
> Register Now & Save for Velocity, the Web Performance & Operations<br>
> Conference from O'Reilly Media. Velocity features a full day of<br>
> expert-led, hands-on workshops and two days of sessions from industry<br>
> leaders in dedicated Performance & Operations tracks. Use code vel09scf<br>
> and Save an extra 15% before 5/3. <a href="http://p.sf.net/sfu/velocityconf" target="_blank">http://p.sf.net/sfu/velocityconf</a><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
><br>
<br>
------------------------------------------------------------------------------<br>
Register Now & Save for Velocity, the Web Performance & Operations<br>
Conference from O'Reilly Media. Velocity features a full day of<br>
expert-led, hands-on workshops and two days of sessions from industry<br>
leaders in dedicated Performance & Operations tracks. Use code vel09scf<br>
and Save an extra 15% before 5/3. <a href="http://p.sf.net/sfu/velocityconf" target="_blank">http://p.sf.net/sfu/velocityconf</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br><br>Embedded Systems and Pervasive Computing Lab (Embedded)<br>Center of Electrical Engineering and Informatics (CEEI)<br>Federal University of Campina Grande (UFCG)<br>