Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: