<div dir="ltr"><div><div><div><div><div><div><div>Hi <br><br></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><br></div><div>                                                                             /-----jpegenc---<br></div>                                                                            /                    \<br>ximagesrc--- ffmpegcolorspace --- output-selector---/-------mp4mux---input-selector---filesink<br><br><br></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></div><br>    def __init_rec_pipeline(self):<br>        self.rec_pipeline = gst.Pipeline("rec-pipeline")<br>        bus = self.rec_pipeline.get_bus()<br>        bus.enable_sync_message_emission()<br>        bus.add_signal_watch()<br>        bus.connect("message", self.gst_bus_message)<br>        <br>        src = gst.element_factory_make("ximagesrc", "src")<br>        src.set_property("xid", self.window.xid)        <br>        <br>        conv = gst.element_factory_make("ffmpegcolorspace", "ffmpegcolorspace")<br>        self.inselect = gst.element_factory_make("input-selector", "inselect")        <br>        self.outselect = gst.element_factory_make("output-selector", "outselect")        <br>        jpegenc = gst.element_factory_make("jpegenc", "jpegenc")<br>        mp4mux = gst.element_factory_make("mp4mux", "mp4mux")        <br>        sink = gst.element_factory_make("filesink", "sink")        <br><br>        self.rec_pipeline.add(src, conv, self.outselect, mp4mux, jpegenc, self.inselect, sink)        <br>        src.link(conv)<br>        conv.link(self.outselect)<br><br>        self.opad_a = self.outselect.get_request_pad("src%d")<br>        self.opad_b = self.outselect.get_request_pad("src%d")<br>        <br>        jpegenc.add_pad(self.opad_a)<br>        mp4mux.add_pad(self.opad_b)<br><br>        self.inselect.link(sink)        <br><br>        self.ipad_a = self.inselect.get_request_pad("src%d")<br>        self.ipad_b = self.inselect.get_request_pad("src%d")<br>        <br>        jpegenc.add_pad(self.ipad_a)<br>        mp4mux.add_pad(self.ipad_b)<br><br></div>The code fail at the last two lines because I can't obtain pads from input-selector.<br></div><div>Any idea ?<br><br></div>Any help or suggestion is welcome.<br></div>Thanks in advance<br></div>