Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-07-01 18:39:32 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-07-01 18:39:32 (GMT)
commit1d3d774aaeebb80721f87ab3451dac193de8bd03 (patch)
treeb9c7a6235f5929eafbf4d749caddd47d3461d39e
parent973f4d9cd7a1978e0e18e376178201c6fa20444c (diff)
don't use gst.Element.set_state as an idle handler
It returns True on success, which results in the idle handler calling the function again...
-rw-r--r--glive.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/glive.py b/glive.py
index fb8834d..bf27919 100644
--- a/glive.py
+++ b/glive.py
@@ -133,6 +133,10 @@ class Glive:
return self.playing
+ def idlePlayElement(self, element):
+ element.set_state(gst.STATE_PLAYING)
+ return False
+
def _nextPipe(self):
if ( len(self.pipes) > 0 ):
@@ -265,7 +269,7 @@ class Glive:
thumbFakesink.set_property("signal-handoffs", True)
self.thumbPipes.append(thumbline)
self.thumbExposureOpen = True
- gobject.idle_add( thumbline.set_state, gst.STATE_PLAYING )
+ gobject.idle_add( self.idlePlayElement, thumbline )
def stoppedRecordingAudio( self ):
@@ -302,7 +306,7 @@ class Glive:
audioBus.add_signal_watch()
self.AUDIO_TRANSCODE_ID = audioBus.connect('message', self._onMuxedAudioMessageCb, audioline)
self.TRANSCODE_ID = gobject.timeout_add(self.TRANSCODE_UPDATE_INTERVAL, self._transcodeUpdateCb, audioline)
- gobject.idle_add( audioline.set_state, gst.STATE_PLAYING )
+ gobject.idle_add( self.idlePlayElement, audioline )
else:
self.record = False
self.audio = False