Lack of GstMiniObject means Gst.Message is broken, can't get EOS signal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Novacut |
Won't Fix
|
High
|
Unassigned | ||
pygobject |
Expired
|
Medium
|
|||
pygobject (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
It's almost possible to use GStreamer from PyGI. The hang up is that currently you can't get EOS signals from a pipeline, and that the message bus is overall broken.
As far as I know, this is because pygobject doesn't grok the GstMiniObject type, which mean Gst.Message is an unknown type. There is an upstream bug with a patch (work in progress):
https:/
I'm not sure if this would be too invasive a change to deliver to Oneiric users through a SRU, but this would help smooth the transition to PyGI (and possibly only shipping Python3 on the CD) for Precise as app devs could be working with PyGI and GStreamer right now on Oneiric.
For what it's worth, this would really help Novacut. Either way, lets make sure PyGI + GStreamer rocks in Precise!
(Side note: this also raises a question... GStreamer 0.10 or 1.0 in Precise?)
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: python3-gobject 3.0.0-0ubuntu2
ProcVersionSign
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Thu Oct 13 15:24:09 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.2)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: pygobject
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in pygobject: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in novacut: | |
importance: | Undecided → High |
status: | New → Triaged |
milestone: | none → 11.10 |
Changed in novacut: | |
milestone: | 11.10 → 11.11 |
Changed in pygobject (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in novacut: | |
milestone: | 11.11 → 12.01 |
Changed in novacut: | |
milestone: | 12.01 → 12.02 |
Changed in novacut: | |
milestone: | 12.02 → 12.03 |
Changed in novacut: | |
milestone: | 12.03 → none |
Changed in pygobject: | |
status: | Confirmed → Expired |
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 threads_ init()
GObject.
from gi.repository import Gst
Gst.init(None)
mainloop = GObject.MainLoop()
pipeline = Gst.Pipeline()
def on_eos(bus, msg): set_state( gst.STATE_ NULL)
print('eos: {!r}'.format(msg))
pipeline.
mainloop.quit()
def on_message(bus, msg):
print('message: {!r}'.format(msg))
bus = pipeline.get_bus() signal_ watch() 'message: :eos', on_eos) 'message' , on_message)
bus.add_
bus.connect(
bus.connect(
bus = pipeline.get_bus() signal_ watch() 'message: :eos', on_eos)
bus.add_
bus.connect(
src = Gst.ElementFact ory.make( 'videotestsrc' , None) property( 'num-buffers' , 10) ory.make( 'fakesink' , None)
src.set_
sink = Gst.ElementFact
pipeline.add(src)
pipeline.add(sink)
src.link(sink)
pipeline. set_state( Gst.State. PLAYING)
mainloop.run()