Actually this issue with message::eos and other messages is fixed with
Gstreamer 1.0 aka currently as Gstreamer 0.11.91-2 on Ubuntu 12.10 (note
you need previously install gstreamer1.0 packages).

You can verify this with this slightly modified code:

#!/usr/bin/python3

from gi.repository import GObject
GObject.threads_init()

import gi
try:
    gi.require_version('Gst', '1.0')
except ValueError:
    print 'Could not find required Gstreamer 1.0 library.'
    sys.exit(1)
    
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()

-- 
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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to