From f27d0d0705b7485c0bff2bfefe258199a5e81168 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Einar=20J=C3=B8rgen=20Haraldseid?= Date: Sat, 3 Jun 2017 19:08:12 +0200 Subject: [PATCH 1/1] It's faster to set pipeline to READY than to NULL --- example4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.30.2