fix vumeter example

Original commit message from CVS:
fix vumeter example
This commit is contained in:
Zaheer Abbas Merali 2006-02-20 16:58:14 +00:00
parent c690bf507f
commit a73fac4769
2 changed files with 8 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2006-02-20 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* examples/vumeter.py:
Fix vumeter example
2006-02-17 Edward Hervey <edward@fluendo.com>
* gst/gst.defs:

View file

@ -92,12 +92,9 @@ class Window(gtk.Dialog):
pipeline = gst.parse_launch(s)
self.set_sensitive(True)
pipeline.get_bus().add_signal_watch()
i = pipeline.get_bus().connect('message::application', self.on_message)
if pipeline.set_state(gst.STATE_PLAYING) == gst.STATE_CHANGE_SUCCESS:
print "going into main"
gtk.Dialog.run(self)
else:
self.error('Could not set state')
i = pipeline.get_bus().connect('message', self.on_message)
pipeline.set_state(gst.STATE_PLAYING)
gtk.Dialog.run(self)
pipeline.get_bus().disconnect(i)
pipeline.get_bus().remove_signal_watch()
pipeline.set_state(gst.STATE_NULL)