[gst-devel] filesink content -> outputing in a file

thiagoss thiagossantos at gmail.com
Mon Apr 27 23:42:41 CEST 2009


On Mon, Apr 27, 2009 at 3:50 PM, Guilherme <grlongo.ireland at gmail.com>wrote:

> Afternoon mates!
>
> Does anyone could help me with that:
>
> Ive already built a code to record a sound from alsa.
>
> Question: Is there a way to create a file with the specified extension
> as .mp3 or .wav and save the whole buffer content in it or a must
> integrate glibc to do it.
>
> Using gst-launch it is done automatically so I suppose I dont need do
> use anything but gstreamer to get to this result.
>
> That is the pipeline
>       * pipeline -> alsasrc -> audioconvert -> wavenc -> filesink
>
> *and here is the end of my file, where I dunno if a could do smth like:
>
>    /*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);
>
> * /*I would do that for strings but I dunno how to get the filesink
> content and save in a file*?*
>   fp = fopen("arquivo.wav","a");
>   gets(filesink);
>   for(i=0; string[i]; i++) putc(string[i], fp);


you don't need this, you set the property 'location' of filesink and it will
output the stream to the file in 'location' path.


>
>
>   g_print ("Deleting pipeline\n");
>   gst_object_unref (GST_OBJECT (pipeline));
>
>  return 0;
>
> 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 -!
>
>
>
> Laszlo Pandy wrote:
> > Correction, Jokosher doesn't use the mixer interface. Jokosher uses
> > the property probe interface for alsasrc and pulsesrc but we leave all
> > mixer tasks like enabling a card for recording and changing volume to
> > the user through gnome-volume-control.
> >
> > On Fri, Apr 24, 2009 at 9:15 AM, Stefan Kost <ensonic at hora-obscura.de>
> wrote:
> >
> >> Guilherme schrieb:
> >>
> >>> Hi mates.
> >>> Finally I found a mailling list on gstreamer.
> >>>
> >>> Im having newb issues here, Ive read the whole manual and I have
> already
> >>> the basic concepts of writing a app using gstreamer.
> >>>
> >>> The problem is, I can't find more materials as tutorials, other
> manuals...!
> >>>
> >>> I need a simple source that reads data from a microphone.
> >>> As I noticed, I should use the Mixer Interface, also for writing a src
> >>> like that, I can handle just implementing a simple GstAudioSrc.
> >>>
> >>>
> >> You can use any audiosrc. on linux you will probably use alsasrc or
> >> pulsesrc. The mixer inface can be use to select the input you want to
> >> record from. And that is there part where I am not aware of an example.
> >> jokosher - a python application uses it.
> >>
> >>> But as I said I coulnd find any material showing some examples.
> >>>
> >>>
> >> get yourself the sources for gstreamer applications :)
> >>
> >> Stefan
> >>
> >>
> >>> Could I get some help with you??
> >>>
> >>>
> >>>
> >>
> ------------------------------------------------------------------------------
> >> Crystal Reports &#45; New Free Runtime and 30 Day Trial
> >> Check out the new simplified licensign option that enables unlimited
> >> royalty&#45;free distribution of the report engine for externally facing
> >> server and web deployment.
> >> http://p.sf.net/sfu/businessobjects
> >> _______________________________________________
> >> gstreamer-devel mailing list
> >> gstreamer-devel at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >>
> >>
> >
> >
> ------------------------------------------------------------------------------
> > Crystal Reports &#45; New Free Runtime and 30 Day Trial
> > Check out the new simplified licensign option that enables unlimited
> > royalty&#45;free distribution of the report engine for externally facing
> > server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >
>
>
> ------------------------------------------------------------------------------
> Crystal Reports &#45; New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty&#45;free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> 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/44bc70b1/attachment.htm>


More information about the gstreamer-devel mailing list