[gst-devel] Gstreamer bus and message
MailingList SVR
lists at svrinformatica.it
Fri May 29 12:17:01 CEST 2009
In data venerdì 29 maggio 2009 11:11:21, MailingList SVR ha scritto:
: > Hi all,
>
> I'm trying to build a gstreamer application all is fine until I try to get a message from the bus. I tested the sample python webcam viewer (http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html) and all is fine: when I start the viewer messages are sent to the bus and if I disconnect the camera an error message is sent to the bus, good,
>
> so I added the following code to my own application (twisted based), this is a cut and paste from the webcam viewer app:
>
> bus = self.pipeline.get_bus()
> bus.add_signal_watch()
> bus.connect("message",self.on_message)
>
> and:
>
> def on_message(self,bus,message):
> print 'new message'
> t=message.type
> print t
> print type(t)
>
> this time i can start and see the video but no message go to the bus neither when I start to see the video or disconnect the camera and no errors are given, maybe the gstreamer bus rely on gtk? Can I use the bus inside twisted?
>
> What I missed?
>
> thanks
> Nicola
>
Ok the problem seems solved, I have to start my gstreamer pipeline as gobject loop and from my twisted frontend I have to start the loop as a separate thread .... nothing simpler? Is this the only way?
Nicola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090529/d3379885/attachment.htm>
More information about the gstreamer-devel
mailing list