git.slaskete.net
/
python-gstreamer-examples
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
02565d3
)
It's faster to set pipeline to READY than to NULL
author
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Sat, 3 Jun 2017 17:08:12 +0000
(19:08 +0200)
committer
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Sat, 3 Jun 2017 17:08:12 +0000
(19:08 +0200)
example4.py
patch
|
blob
|
history
diff --git
a/example4.py
b/example4.py
index 73987820b1e3ca70550f54938ea3919250ba17d4..12e10aad6bf0c71f85a0a9e0a6cee978be05cef5 100755
(executable)
--- 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
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)
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
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)
self.ballcaps.unlink(self.videosink)
self.pipeline.remove(self.ball)
self.pipeline.remove(self.ballcaps)