<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Should it not be<div class=""><br class=""></div><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">        self.ipad_a = self.inselect.get_request_pad("<b class="">sink%d</b>")<br class="">        self.ipad_b = self.inselect.get_request_pad("<b class="">sink%d</b>”)</div><div class=""><br class=""></div><div class="">They’re sink pads not source pads.</div><div class=""><br class=""></div><div class="">Sérgio</div></div></div></div><br class=""><div><blockquote type="cite" class=""><div class="">On 29 Nov 2014, at 16:35, Chiheb Djabri <<a href="mailto:iceonfire29@gmail.com" class="">iceonfire29@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">Hi <br class=""><br class=""></div>I am a Gstreamer newbie and I createrd a Python Gtk application and then I created a gst pipeline for streaming from webcam. This work fine. I also create another pipeline for recording and taking picture. I have the following elements:<br class=""><br class=""></div><div class="">                                                                             /-----jpegenc---<br class=""></div>                                                                            /                    \<br class="">ximagesrc--- ffmpegcolorspace --- output-selector---/-------mp4mux---input-selector---filesink<br class=""><br class=""><br class=""></div>The problem is that i can't link elements together (I am not really sure of what I am doing). Here is my code:<br class=""></div><br class="">    def __init_rec_pipeline(self):<br class="">        self.rec_pipeline = gst.Pipeline("rec-pipeline")<br class="">        bus = self.rec_pipeline.get_bus()<br class="">        bus.enable_sync_message_emission()<br class="">        bus.add_signal_watch()<br class="">        bus.connect("message", self.gst_bus_message)<br class="">        <br class="">        src = gst.element_factory_make("ximagesrc", "src")<br class="">        src.set_property("xid", self.window.xid)        <br class="">        <br class="">        conv = gst.element_factory_make("ffmpegcolorspace", "ffmpegcolorspace")<br class="">        self.inselect = gst.element_factory_make("input-selector", "inselect")        <br class="">        self.outselect = gst.element_factory_make("output-selector", "outselect")        <br class="">        jpegenc = gst.element_factory_make("jpegenc", "jpegenc")<br class="">        mp4mux = gst.element_factory_make("mp4mux", "mp4mux")        <br class="">        sink = gst.element_factory_make("filesink", "sink")        <br class=""><br class="">        self.rec_pipeline.add(src, conv, self.outselect, mp4mux, jpegenc, self.inselect, sink)        <br class="">        src.link(conv)<br class="">        conv.link(self.outselect)<br class=""><br class="">        self.opad_a = self.outselect.get_request_pad("src%d")<br class="">        self.opad_b = self.outselect.get_request_pad("src%d")<br class="">        <br class="">        jpegenc.add_pad(self.opad_a)<br class="">        mp4mux.add_pad(self.opad_b)<br class=""><br class="">        self.inselect.link(sink)        <br class=""><br class="">        self.ipad_a = self.inselect.get_request_pad("src%d")<br class="">        self.ipad_b = self.inselect.get_request_pad("src%d")<br class="">        <br class="">        jpegenc.add_pad(self.ipad_a)<br class="">        mp4mux.add_pad(self.ipad_b)<br class=""><br class=""></div>The code fail at the last two lines because I can't obtain pads from input-selector.<br class=""></div><div class="">Any idea ?<br class=""><br class=""></div>Any help or suggestion is welcome.<br class=""></div>Thanks in advance<br class=""></div>
_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></blockquote></div><br class=""></div></body></html>