Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2010-06-25 22:16:27 (GMT)
committer Daniel Drake <dsd@laptop.org>2010-06-25 22:16:27 (GMT)
commit9b818b46be5a5df15cc77510ac68c808c63f1715 (patch)
tree40c00b7a333fa91c3075aca9fd1cd87a1587fc83
parent98fd799e05f532802c4307b99ea4f30dbfe2fc72 (diff)
Stop pipeline while adding audiobin (#2040)
Several seconds of silence were being prepended to the recording. This looks like a gstreamer bug. Work around it by stopping the whole pipeline while adjusting it. http://bugs.sugarlabs.org/ticket/2040 http://dev.laptop.org/ticket/10175
-rw-r--r--glive.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/glive.py b/glive.py
index 701f970..40815a4 100644
--- a/glive.py
+++ b/glive.py
@@ -480,8 +480,14 @@ class Glive:
self._takePhoto()
self.record = True
+
+ # we should be able to add the audiobin on the fly, but unfortunately
+ # this results in several seconds of silence being added at the start
+ # of the recording. So we stop the whole pipeline while adjusting it.
+ # SL#2040
+ self.pipeline.set_state(gst.STATE_NULL)
self.pipeline.add(self.audiobin)
- self.audiobin.set_state(gst.STATE_PLAYING)
+ self.pipeline.set_state(gst.STATE_PLAYING)
def stopRecordingVideo(self):
if not camera_presents: