<br><br><div class="gmail_quote">On Mon, Apr 27, 2009 at 3:50 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;">
Afternoon mates!<br>
<br>
Does anyone could help me with that:<br>
<br>
Ive already built a code to record a sound from alsa.<br>
<br>
Question: Is there a way to create a file with the specified extension<br>
as .mp3 or .wav and save the whole buffer content in it or a must<br>
integrate glibc to do it.<br>
<br>
Using gst-launch it is done automatically so I suppose I dont need do<br>
use anything but gstreamer to get to this result.<br>
<br>
That is the pipeline<br>
* pipeline -> alsasrc -> audioconvert -> wavenc -> filesink<br>
<br>
*and here is the end of my file, where I dunno if a could do smth like:<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>
* /*I would do that for strings but I dunno how to get the filesink<br>
content and save in a file*?*<br>
fp = fopen("arquivo.wav","a");<br>
gets(filesink);<br>
for(i=0; string[i]; i++) putc(string[i], fp);</blockquote><div><br></div><div>you don't need this, you set the property 'location' of filesink and it will output the stream to the file in 'location' path.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
g_print ("Deleting pipeline\n");<br>
gst_object_unref (GST_OBJECT (pipeline));<br>
<br>
return 0;<br>
<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>
Laszlo Pandy wrote:<br>
> Correction, Jokosher doesn't use the mixer interface. Jokosher uses<br>
> the property probe interface for alsasrc and pulsesrc but we leave all<br>
> mixer tasks like enabling a card for recording and changing volume to<br>
> the user through gnome-volume-control.<br>
><br>
> On Fri, Apr 24, 2009 at 9:15 AM, Stefan Kost <<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>> wrote:<br>
><br>
>> Guilherme schrieb:<br>
>><br>
>>> Hi mates.<br>
>>> Finally I found a mailling list on gstreamer.<br>
>>><br>
>>> Im having newb issues here, Ive read the whole manual and I have already<br>
>>> the basic concepts of writing a app using gstreamer.<br>
>>><br>
>>> The problem is, I can't find more materials as tutorials, other manuals...!<br>
>>><br>
>>> I need a simple source that reads data from a microphone.<br>
>>> As I noticed, I should use the Mixer Interface, also for writing a src<br>
>>> like that, I can handle just implementing a simple GstAudioSrc.<br>
>>><br>
>>><br>
>> You can use any audiosrc. on linux you will probably use alsasrc or<br>
>> pulsesrc. The mixer inface can be use to select the input you want to<br>
>> record from. And that is there part where I am not aware of an example.<br>
>> jokosher - a python application uses it.<br>
>><br>
>>> But as I said I coulnd find any material showing some examples.<br>
>>><br>
>>><br>
>> get yourself the sources for gstreamer applications :)<br>
>><br>
>> Stefan<br>
>><br>
>><br>
>>> Could I get some help with you??<br>
>>><br>
>>><br>
>>><br>
>> ------------------------------------------------------------------------------<br>
>> Crystal Reports &#45; New Free Runtime and 30 Day Trial<br>
>> Check out the new simplified licensign option that enables unlimited<br>
>> royalty&#45;free distribution of the report engine for externally facing<br>
>> server and web deployment.<br>
>> <a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</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>
>><br>
>><br>
><br>
> ------------------------------------------------------------------------------<br>
> Crystal Reports &#45; New Free Runtime and 30 Day Trial<br>
> Check out the new simplified licensign option that enables unlimited<br>
> royalty&#45;free distribution of the report engine for externally facing<br>
> server and web deployment.<br>
> <a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</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>
><br>
><br>
<br>
------------------------------------------------------------------------------<br>
Crystal Reports &#45; New Free Runtime and 30 Day Trial<br>
Check out the new simplified licensign option that enables unlimited<br>
royalty&#45;free distribution of the report engine for externally facing<br>
server and web deployment.<br>
<a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</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>
</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>