diff options
author | Daniel Drake <dsd@laptop.org> | 2008-07-08 16:01:34 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2008-07-08 16:01:34 (GMT) |
commit | 8ac16e984c7e3bcbaf930c47c41aff49d6cf248e (patch) | |
tree | c3e6a7856ddfad3bb576417769c1e544a189e374 | |
parent | a5874cae87288ab8ebedee941a06076ddfaa1c62 (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.
-rw-r--r-- | glive.py | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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 |