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