<br><br><div class="gmail_quote">On Mon, Apr 27, 2009 at 10:52 PM, Guilherme <span dir="ltr">&lt;<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a>&gt;</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&#39;s because it is only available from repository or prerelease tarballs. To use it, you&#39;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&#39;d rather die on my feet than live on my knees -!<br>
<br>
<br>
<br>
</div><div class="im">thiagoss wrote:<br>
&gt; I suppose you&#39;re finishing your application by pressing ctrl-c, I<br>
&gt; don&#39;t know if wavenc cares about it, but this way you get no eos (if<br>
&gt; wavenc cares about it to finish the file, this makes a difference).<br>
&gt; You might want to set num-buffers property of audiotestsrc and listen<br>
&gt; for EOS messages from the bus and quit the mainloop when it happens.<br>
&gt;<br>
&gt; Btw, what was the problem with gst-launch -e ?<br>
&gt;<br>
&gt; On Mon, Apr 27, 2009 at 7:42 PM, Guilherme &lt;<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:grlongo.ireland@gmail.com">grlongo.ireland@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Thiago, I did it before and all I get is a cracked sound.<br>
&gt;<br>
&gt;     Pretty weird.<br>
&gt;<br>
&gt;     Have a look what I was doing before:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     #include&lt;gst/gst.h&gt;<br>
&gt;     #include&lt;glib.h&gt;<br>
&gt;<br>
&gt;     static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer data);<br>
&gt;<br>
&gt;     int main(int argc, char *argv[])<br>
&gt;     {<br>
&gt;        GMainLoop *loop;<br>
&gt;<br>
&gt;        GstElement *pipeline, *source, *audioconvert, *wavenc, *filesink;<br>
&gt;        GstBus *bus;<br>
&gt;<br>
&gt;        gst_init(&amp;argc, &amp;argv);<br>
&gt;<br>
&gt;        loop = g_main_loop_new (NULL, FALSE);<br>
&gt;<br>
&gt;        /*creating elements*/<br>
&gt;        pipeline     = gst_pipeline_new (&quot;audio-player&quot;);<br>
&gt;        source       = gst_element_factory_make (&quot;audiotestsrc&quot;,<br>
&gt;     &quot;file-source&quot;);<br>
&gt;        //audioconvert = gst_element_factory_make (&quot;audioconvert&quot;,<br>
&gt;     &quot;audio-conversor&quot;);<br>
&gt;        wavenc       = gst_element_factory_make (&quot;wavenc&quot;,<br>
&gt;     &quot;wave-enc&quot;);<br>
&gt;        filesink     = gst_element_factory_make (&quot;filesink&quot;,<br>
&gt;     &quot;audio-output&quot;);<br>
&gt;<br>
&gt;        if (!pipeline || !source || !audioconvert|| !wavenc || !filesink) {<br>
&gt;            g_printerr (&quot;One element could not be created. Exiting.\n&quot;);<br>
&gt;            return -1;<br>
&gt;        }<br>
&gt;<br>
&gt;       * g_object_set (G_OBJECT (filesink), &quot;location&quot;, &quot;foo.wav&quot;, NULL);*<br>
&gt;<br>
&gt;        /*set-up the pipeline*/<br>
&gt;<br>
&gt;        /*message handler*/<br>
&gt;        bus =  gst_pipeline_get_bus (GST_PIPELINE (pipeline));<br>
&gt;        gst_bus_add_watch (bus, bus_call, loop);<br>
&gt;        gst_object_unref (bus);<br>
&gt;<br>
&gt;        /*colocar todos elementos na pipeline*/<br>
&gt;        gst_bin_add_many (GST_BIN (pipeline), source, wavenc, filesink,<br>
&gt;     NULL);<br>
&gt;<br>
&gt;        /*Linkar elementos*/<br>
&gt;        //gst_element_link ();<br>
&gt;        gst_element_link_many (source, wavenc, filesink, NULL);<br>
&gt;        //g_signal_connect (demuxer, &quot;pad-added&quot;, G_CALLBACK<br>
&gt;     (on_pad_added),<br>
&gt;     decoder);<br>
&gt;<br>
&gt;        /* set pipeline playing status */<br>
&gt;        g_print (&quot;Running...\n&quot;);<br>
&gt;        gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>
&gt;<br>
&gt;        /*iterate*/<br>
&gt;        g_print (&quot;Recording\n&quot;);<br>
&gt;        g_main_loop_run (loop);<br>
&gt;<br>
&gt;        /* Out of the main loop, clean up nicely */<br>
&gt;       g_print (&quot;Returned, stopping playback\n&quot;);<br>
&gt;       gst_element_set_state (pipeline, GST_STATE_NULL);<br>
&gt;<br>
&gt;       g_print (&quot;Deleting pipeline\n&quot;);<br>
&gt;       gst_object_unref (GST_OBJECT (pipeline));<br>
&gt;<br>
&gt;      return 0;<br>
&gt;     }<br>
&gt;<br>
&gt;     static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer<br>
&gt;     data) {<br>
&gt;<br>
&gt;        return TRUE;<br>
&gt;     }<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     ------------------------------------------------------------------------------<br>
&gt;     Register Now &amp; Save for Velocity, the Web Performance &amp; Operations<br>
&gt;     Conference from O&#39;Reilly Media. Velocity features a full day of<br>
&gt;     expert-led, hands-on workshops and two days of sessions from industry<br>
&gt;     leaders in dedicated Performance &amp; Operations tracks. Use code<br>
&gt;     vel09scf<br>
&gt;     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>
&gt;     _______________________________________________<br>
&gt;     gstreamer-devel mailing list<br>
&gt;     <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>&gt;<br>
<div class="im">&gt;     <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Thiago Sousa Santos<br>
&gt;<br>
&gt; Embedded Systems and Pervasive Computing Lab (Embedded)<br>
&gt; Center of Electrical Engineering and Informatics (CEEI)<br>
&gt; Federal University of Campina Grande (UFCG)<br>
</div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Register Now &amp; Save for Velocity, the Web Performance &amp; Operations<br>
&gt; Conference from O&#39;Reilly Media. Velocity features a full day of<br>
&gt; expert-led, hands-on workshops and two days of sessions from industry<br>
&gt; leaders in dedicated Performance &amp; Operations tracks. Use code vel09scf<br>
&gt; 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>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
<br>
------------------------------------------------------------------------------<br>
Register Now &amp; Save for Velocity, the Web Performance &amp; Operations<br>
Conference from O&#39;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 &amp; 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>