<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:10pt; font-weight:400; font-style:normal;">In data venerd́ 29 maggio 2009 11:11:21, MailingList SVR ha scritto:<br>
: &gt; Hi all,<br>
&gt; <br>
&gt; 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,<br>
&gt; <br>
&gt; so I added the following code to my own application (twisted based), this is a cut and paste from the webcam viewer app:<br>
&gt; <br>
&gt; bus = self.pipeline.get_bus()<br>
&gt; bus.add_signal_watch()<br>
&gt; bus.connect("message",self.on_message)<br>
&gt; <br>
&gt; and:<br>
&gt; <br>
&gt; def on_message(self,bus,message):<br>
&gt;                 print 'new message'<br>
&gt;                 t=message.type<br>
&gt;                 print t<br>
&gt;                 print type(t)<br>
&gt; <br>
&gt; 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?<br>
&gt; <br>
&gt; What I missed?<br>
&gt; <br>
&gt; thanks<br>
&gt; Nicola<br>
&gt; <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Nicola</p></body></html>