<div dir="ltr">Hi Gontzal<div><br></div><div>There are a lot of details to consider when manually building a pipeline, specially when linking elements together. I recommend you using the available parser wrappers, which are way more convenient. Take a look at the following snippet, it does exactly the same as yours, but takes care of the details internally (and looks cleaner to me)</div><div><br></div><div>Good Luck!</div><div>Gruner</div><div><br></div><div><br></div><div><div style="font-size:13px">uses Gst</div><div style="font-size:13px"><br></div><div style="font-size:13px">pipeline: private Pipeline </div><div style="font-size:13px">gst_launch: private string</div><div style="font-size:13px"><br></div><div style="font-size:13px">init</div><div style="font-size:13px">    Gst.init (ref args);</div><div style="font-size:13px"><br></div><div style="font-size:13px">    gst_launch = "interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav filesrc location=file1.wav ! decodebin ! audioconvert ! 'audio/x-raw-int,channels=1' ! queue ! i.   filesrc location=file2.wav ! decodebin ! audioconvert ! 'audio/x-raw-int,channels=1' ! queue ! i."</div><div style="font-size:13px"><br></div><div style="font-size:13px">    pipeline = Gst.parse_launch(gst_launch) as Pipeline;</div><div style="font-size:13px"><br></div><div style="font-size:13px">    pipeline.set_state(Gst.State.PLAYING)</div><div style="font-size:13px"><br></div><div style="font-size:13px">    new MainLoop().run();</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 4, 2016 at 5:31 PM, gontzal <span dir="ltr"><<a href="mailto:txasatonga@gmail.com" target="_blank">txasatonga@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi to all. <div><br></div><div>I would to ask you how can I traslate this gst-launch code to a pyhton or Vala or Genie code. </div><div><br></div><div>gst-launch-0.10 interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav \</div><div>filesrc location=file1.wav ! decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i. \</div><div>  filesrc location=file2.wav ! decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i.</div><div><br></div><div>I have tryied with this code without success.</div><div><br></div><div>uses Gst</div><div><br></div><div>pipeline: private Pipeline </div><div>interleave: private Element</div><div>audioconvert: private Element</div><div>audioconvert2: private Element</div><div>audioconvert3: private Element</div><div>wavenc: private Element</div><div>decodebin2: private Element</div><div>decodebin3: private Element</div><div>capsfilter2: private Element</div><div>capsfilter3: private Element</div><div>filesink: private Element</div><div>src3:private Element</div><div>src2:private Element</div><div>queue2:private Element</div><div>queue3:private Element</div><div>capsfilter2a:private Element</div><div>capsfilter3a:private Element</div><div><br></div><div>init</div><div>    Gst.init (ref args);</div><div>    pipeline = new Pipeline ("mypipeline");</div><div><br></div><div>    interleave=ElementFactory.make ("interleave","inter")</div><div>    interleave.set ("name","i")</div><div>    audioconvert=ElementFactory.make ("audioconvert","audioconvert")</div><div>    wavenc=ElementFactory.make ("wavenc","wavenc")</div><div>    filesink=ElementFactory.make ("filesink","filesink")</div><div>    filesink.set("location","totalfinal.wav")</div><div><br></div><div>    // primer archivo</div><div>    src2= ElementFactory.make ("filesrc", "filesrc2")</div><div>    src2.set ("location","file1.wav")</div><div>    decodebin2= ElementFactory.make ("decodebin", "decodebin2")</div><div>    audioconvert2= ElementFactory.make ("audioconvert", "audioconvert2")</div><div>    capsfilter2= ElementFactory.make ("capsfilter","capsfileter2")</div><div>    capsfilter2.set("caps", Gst.Caps.from_string("audio/x-raw-int,channels=1"))</div><div>    queue2= ElementFactory.make ("queue","queue2")</div><div>    capsfilter2a= ElementFactory.make ("capsfilter","capsfileter2a")</div><div>    capsfilter2a.set("caps", Gst.Caps.from_string("i.sink_0"))</div><div><br></div><div>    // segundo archivo</div><div>    src3= ElementFactory.make ("filesrc", "filesrc3")</div><div>    src3.set ("location","file2.wav")</div><div>    decodebin3= ElementFactory.make ("decodebin", "decodebin3")</div><div>    audioconvert3= ElementFactory.make ("audioconvert", "audioconvert3")</div><div>    capsfilter3= ElementFactory.make ("capsfilter","capsfileter3")</div><div>    capsfilter3.set("caps", Gst.Caps.from_string("audio/x-raw-int,channels=1"))</div><div>    queue3= ElementFactory.make ("queue","queue3")</div><div>    capsfilter3a= ElementFactory.make ("capsfilter","capsfileter3a")</div><div>    capsfilter3a.set("caps", Gst.Caps.from_string("i.sink_1"))</div><div><br></div><div><br></div><div>    pipeline.add_many(interleave,wavenc,filesink,audioconvert);</div><div>    pipeline.add_many(src2,src3,decodebin2,decodebin3,audioconvert2,audioconvert3,capsfilter2,capsfilter2a,capsfilter3,capsfilter3a);</div><div>    pipeline.add_many(queue2,queue3);</div><div><br></div><div>    // basic line</div><div>    interleave.link(audioconvert)</div><div>    audioconvert.link(wavenc)</div><div>    wavenc.link(filesink)</div><div><br></div><div>    // first src</div><div>    src2.link(decodebin2)</div><div>    decodebin2.link(audioconvert2)</div><div>    audioconvert2.link(capsfilter2)</div><div>    capsfilter2.link(queue2)</div><div>    queue2.link(capsfilter2a)</div><div><br></div><div>    // second src</div><div>    src3.link(decodebin3)</div><div>    decodebin3.link(audioconvert3)</div><div>    audioconvert3.link(capsfilter3)</div><div>    capsfilter3.link(queue3)</div><div>    queue3.link(capsfilter3a)</div><div><br></div><div><br></div><div>    pipeline.set_state(Gst.State.PLAYING)</div><div><br></div><div>    new MainLoop().run();</div><div><br></div><div>I have published the same question in stackoverflow. I you want you can answer there.</div><div><a href="http://stackoverflow.com/questions/34520717/i-need-help-about-of-audio-interleave-on-gstreamer-0-10/34523133?noredirect=1#comment56821434_34523133" target="_blank">http://stackoverflow.com/questions/34520717/i-need-help-about-of-audio-interleave-on-gstreamer-0-10/34523133?noredirect=1#comment56821434_34523133</a></div><div>Thanks.</div><span class="HOEnZb"><font color="#888888"><div>Gontzal</div></font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>