Gst.Bin.add() wants only one argument
authorgregor herrmann <gregor@toastfreeware.priv.at>
Thu, 9 Jul 2020 18:09:41 +0000 (20:09 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Thu, 9 Jul 2020 18:22:42 +0000 (20:22 +0200)
add elements separately.
yes this is surprising.

lagarde.py

index 08c37b0f428adf66d4e0d09d92c04823f3de9229..29cb085482c26c795614113e59ce4812ba77e064 100755 (executable)
@@ -73,7 +73,9 @@ class Lagarde:
                 q = Gst.ElementFactory.make('queue')
                 conv = Gst.ElementFactory.make('videoconvert')
                 sink = Gst.ElementFactory.make('autovideosink')
-                self.pipe.add(q, conv, sink)
+                self.pipe.add(q)
+                self.pipe.add(conv)
+                self.pipe.add(sink)
                 self.pipe.sync_children_states()
                 pad.link(q.get_static_pad('sink'))
                 q.link(conv)
@@ -83,7 +85,10 @@ class Lagarde:
                 conv = Gst.ElementFactory.make('audioconvert')
                 resample = Gst.ElementFactory.make('audioresample')
                 sink = Gst.ElementFactory.make('autoaudiosink')
-                self.pipe.add(q, conv, resample, sink)
+                self.pipe.add(q)
+                self.pipe.add(conv)
+                self.pipe.add(resample)
+                self.pipe.add(sink)
                 self.pipe.sync_children_states()
                 pad.link(q.get_static_pad('sink'))
                 q.link(conv)