diff options
Diffstat (limited to 'pysamples/grecord.py')
-rw-r--r-- | pysamples/grecord.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pysamples/grecord.py b/pysamples/grecord.py index 84b1a5c..94599ee 100644 --- a/pysamples/grecord.py +++ b/pysamples/grecord.py @@ -15,11 +15,10 @@ def myblock(tw, arg): import os import time - import gtk + from util.gtkcompat import Gtk, GObject import gst - import gobject - gobject.threads_init() + GObject.threads_init() from TurtleArt.tautils import get_path from TurtleArt.tagplay import play_audio_from_file @@ -139,7 +138,7 @@ def myblock(tw, arg): audioBus.add_signal_watch() self._audio_transcode_handler = audioBus.connect( 'message', self._onMuxedAudioMessageCb, audioline) - self._transcode_id = gobject.timeout_add( + self._transcode_id = GObject.timeout_add( 200, self._transcodeUpdateCb, audioline) audioline.set_state(gst.STATE_PLAYING) @@ -170,9 +169,9 @@ def myblock(tw, arg): if message.type != gst.MESSAGE_EOS: return True - gobject.source_remove(self._audio_transcode_handler) + GObject.source_remove(self._audio_transcode_handler) self._audio_transcode_handler = None - gobject.source_remove(self._transcode_id) + GObject.source_remove(self._transcode_id) self._transcode_id = None pipe.set_state(gst.STATE_NULL) pipe.get_bus().remove_signal_watch() |