From: Einar Jørgen Haraldseid Date: Sat, 3 Jun 2017 17:08:12 +0000 (+0200) Subject: It's faster to set pipeline to READY than to NULL X-Git-Url: https://git.slaskete.net/python-gstreamer-examples/commitdiff_plain/f27d0d0705b7485c0bff2bfefe258199a5e81168?hp=02565d3145b9c03a575b9c3959ebd4ab61287ba4 It's faster to set pipeline to READY than to NULL --- diff --git a/example4.py b/example4.py index 7398782..12e10aa 100755 --- a/example4.py +++ b/example4.py @@ -92,7 +92,7 @@ class Main: def SetInput1(self, widget): print("Switch to input 1") # Halt current pipeline and tear it down - self.pipeline.set_state(Gst.State.NULL) + self.pipeline.set_state(Gst.State.READY) self.webcamcaps.unlink(self.videosink) self.pipeline.remove(self.webcam) self.pipeline.remove(self.webcamcaps) @@ -106,7 +106,7 @@ class Main: def SetInput2(self, widget): print("Switch to input 2") # Halt current pipeline and tear it down - self.pipeline.set_state(Gst.State.NULL) + self.pipeline.set_state(Gst.State.READY) self.ballcaps.unlink(self.videosink) self.pipeline.remove(self.ball) self.pipeline.remove(self.ballcaps)