Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/glive.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-07-08 16:01:34 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-07-08 16:01:34 (GMT)
commit8ac16e984c7e3bcbaf930c47c41aff49d6cf248e (patch)
treec3e6a7856ddfad3bb576417769c1e544a189e374 /glive.py
parenta5874cae87288ab8ebedee941a06076ddfaa1c62 (diff)
Stop pipeline while linking in video recording elements
When you add the video recording elements (theora + wav writing) on-the-fly, there is a very visible freeze to the recorded video output (several seconds). This delay completely goes away if you stop the pipeline while doing the reshuffling, and the visual glitch caused by this is minimal.
Diffstat (limited to 'glive.py')
-rw-r--r--glive.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/glive.py b/glive.py
index 8f4bf29..1c944fc 100644
--- a/glive.py
+++ b/glive.py
@@ -336,15 +336,11 @@ class Glive:
self.record = True
self.audio = True
- pad = self.videobin.get_static_pad("sink")
- pad.set_blocked_async(True, self.blockedCb, None)
+ self.pipeline.set_state(gst.STATE_NULL)
self.pipeline.add(self.videobin)
- self.videobin.set_state(gst.STATE_PLAYING)
self.pipeline.get_by_name("tee").link(self.videobin)
- pad.set_blocked_async(False, self.blockedCb, None)
-
self.pipeline.add(self.audiobin)
- self.audiobin.set_state(gst.STATE_PLAYING)
+ self.pipeline.set_state(gst.STATE_PLAYING)
def startRecordingAudio(self):
self.audioPixbuf = None