<div dir="ltr">Or <span style="font-size:13px;color:rgb(0,96,176);font-weight:bold;font-family:'UbuntuBeta Mono','Ubuntu Mono',monospace">pipeline_create_simple </span>function.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Dec 1, 2013 at 9:06 PM, Osmo Antero <span dir="ltr"><<a href="mailto:osmoma@gmail.com" target="_blank">osmoma@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hello,</div><div>I do not know gst-python, but in my c-code based recorder I have to create a bin from the (caps) capability string.<br></div><div>I think you should use the gst_parse_bin_from_description(...) </div>

<div><br></div><div>Please take a look at my recorder. It links to Gstreamer 1.0 (not 0.10).<br></div><div><a href="http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/gst-pipeline.c" target="_blank">http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/gst-pipeline.c</a><br>

</div><div>Look for the "pipeline_create_complex" function.</div><div><br></div><div>I have hard-coded some audio profiles (capability strings) in: </div><div><a href="http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/media-profiles.c" target="_blank">http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/media-profiles.c</a></div>

<div> </div><div>Audio-recorder itself:</div><div><a href="https://launchpad.net/audio-recorder/" target="_blank">https://launchpad.net/audio-recorder/</a><br></div><div><br></div><div>Osmo (Moma) Antero</div></div><div class="gmail_extra">
<div><div class="h5">
<br><br><div class="gmail_quote">On Sun, Dec 1, 2013 at 6:33 PM, Pablo Rodriguez <span dir="ltr"><<a href="mailto:oinos@gmx.es" target="_blank">oinos@gmx.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi there,<br>
<br>
first of all, congratulations for your excellent work on Gstreamer and<br>
many thanks for releasing it under a free license.<br>
<br>
I have a small script that records sound from microphone to a .wav file.<br>
it is written in Python. You can find it at<br>
<a href="https://github.com/ousia/iRaccoonShow/blob/master/recslides.py" target="_blank">https://github.com/ousia/iRaccoonShow/blob/master/recslides.py</a>, but the<br>
relevant part is:<br>
<br>
        self.player = gst.Pipeline("player")<br>
        #~ self.clock = self.player.get_clock()<br>
<br>
        self.source = gst.element_factory_make("alsasrc", "alsa-source")<br>
        #~ self.caps = gst.Caps("audio/x-raw-int,rate=16000,channels=1")<br>
<br>
        self.encoder = gst.element_factory_make("wavenc", "wavenc")<br>
<br>
        self.fileout = gst.element_factory_make("filesink", "sink")<br>
        self.fileout.set_property("location", self.audiofilename )<br>
<br>
        self.player.add(self.source, self.encoder, self.fileout)<br>
        gst.element_link_many(self.source, self.encoder, self.fileout)<br>
<br>
Before I forget, I use Fedora 19, which comes with gstreamer-0.10.36.<br>
<br>
When I start the script, I always get the following error:<br>
<br>
    ** Message: pygobject_register_sinkfunc is deprecated (GstObject)<br>
<br>
How could I fix this?<br>
<br>
The other issue is the only commented line in the code snippet above. I<br>
would like to have the sound recorded with a lower frame rate and only<br>
one channel (otherwise, output files are huge).<br>
<br>
How should I integrate the self.caps line, so that I have an output<br>
files with these features?<br>
<br>
Many thanks for your help,<br>
<br>
<br>
Pablo<br>
<span><font color="#888888">--<br>
<a href="http://www.ousia.tk" target="_blank">http://www.ousia.tk</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>// moma<br>   <a href="http://www.futuredesktop.org" target="_blank">http://www.futuredesktop.org</a>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>// moma<br>   <a href="http://www.futuredesktop.org">http://www.futuredesktop.org</a>
</div>