diff options
author | C. Scott Ananian <cscott@cscott.net> | 2011-10-25 07:08:15 (GMT) |
---|---|---|
committer | C. Scott Ananian <cscott@cscott.net> | 2011-11-02 19:44:28 (GMT) |
commit | c91efbf665aad71b69d1f43196b57f01ad631a4e (patch) | |
tree | f0187280e255cec6eb6a940da012cb2831e56f0a /pysamples/grecord.py | |
parent | b81f399d5c57465e95cca0fac241975bc75df303 (diff) |
Run automatic conversion to gtk3/gir.gtk3-precairo
This doesn't actually work under gtk3 yet, but it shouldn't break on gtk2.
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() |