I consider this a good test case for this bug.  Same problem whether you
use Python2 or Python3 (but for Novacut, we care about Python3).
Currently this script will fail with:

TypeError: unknown type GstMessage


#!/usr/bin/python3

from gi.repository import GObject
GObject.threads_init()

from gi.repository import Gst
Gst.init(None)

mainloop = GObject.MainLoop()
pipeline = Gst.Pipeline()

def on_eos(bus, msg):
    print('eos: {!r}'.format(msg))
    pipeline.set_state(gst.STATE_NULL)
    mainloop.quit()

def on_message(bus, msg):
    print('message: {!r}'.format(msg))

bus = pipeline.get_bus()
bus.add_signal_watch()
bus.connect('message::eos', on_eos)
bus.connect('message', on_message)

bus = pipeline.get_bus()
bus.add_signal_watch()
bus.connect('message::eos', on_eos)

src = Gst.ElementFactory.make('videotestsrc', None)
src.set_property('num-buffers', 10)
sink = Gst.ElementFactory.make('fakesink', None)
pipeline.add(src)
pipeline.add(sink)
src.link(sink)

pipeline.set_state(Gst.State.PLAYING)
mainloop.run()

** Bug watch added: GNOME Bug Tracker #631901
   https://bugzilla.gnome.org/show_bug.cgi?id=631901

** Also affects: pygobject via
   https://bugzilla.gnome.org/show_bug.cgi?id=631901
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/873712

Title:
  Lack of GstMiniObject means Gst.Message is broken, can't get EOS
  signal

To manage notifications about this bug go to:
https://bugs.launchpad.net/novacut/+bug/873712/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to