diff options
author | Daniel Drake <dsd@laptop.org> | 2008-07-01 18:39:32 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2008-07-01 18:39:32 (GMT) |
commit | 1d3d774aaeebb80721f87ab3451dac193de8bd03 (patch) | |
tree | b9c7a6235f5929eafbf4d749caddd47d3461d39e | |
parent | 973f4d9cd7a1978e0e18e376178201c6fa20444c (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.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |