[gst-devel] python events do not work

Edward Hervey bilboed at gmail.com
Thu Nov 3 03:57:17 CET 2005


Hi,
  'eos' and 'error' events don't exist anymore in 0.9. You are meant
to use the bus for that. And you also need to have a mainloop running.
Better have a more thorough look at the play.py example.

  Edward

On 11/3/05, John Janecek <nopa90 at gmail.com> wrote:
> I do not think they are broken I am just missing something.
>
> Downloaded gst-python 0.94 and installed
>
> Most of the demos work except where connection events
>
> def main():
>        fname = sys.argv[1]
>        absfname = os.path.abspath(fname)
>        uri = 'file://%s' % absfname
>
>        # Setup video/audio sink and playbin
>        vsink = gst.element_factory_make('xvimagesink')
>        asink = gst.element_factory_make('alsasink', 'asink')
>        playbin = gst.element_factory_make('playbin', 'playbin')
>        playbin.set_property('video-sink', vsink)
>        playbin.set_property('audio-sink', asink)
>        playbin.set_property('uri', uri)
>
>        playbin.connect('eos', cb_eos)
>        playbin.connect('error', cb_error)
>
>        win = gtk.Window(gtk.WINDOW_TOPLEVEL)
>        da = gtk.DrawingArea()
>        ctr = Control(playbin, vsink, da)
>        win.add(da)
>        win.connect('key-release-event', ctr.key_release)
>        win.connect('delete-event', ctr.quit)
>        win.show_all()
>        gtk.main()
>        playbin.set_state(gst.STATE_NULL)
>
> when it hit playbin.connect('eos') it report
> TypeError: <__main__.GstPlayBin object (playbin) at 0xb6fa22d4>:
> unknown signal name: eos
>
>
> what am I doing wrong ? Am i missing something ?
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>


--
Edward Hervey
Junior developer / Fluendo S.L.
http://www.pitivi.org/


More information about the gstreamer-devel mailing list