John Stowers a écrit :
> On Mon, 2009-11-16 at 22:56 +0400, Nico wrote:
>   
>> Hi,
>> I use gstreamer and pygtk for webcam acquisition. Since I upgraded to
>> ubuntu karmic 9.10, I was facing some application freeze/crash.
>>     
>
> Hi,
>
> I also have an application based off that example code, and can confirm
> the behaviour you are seeing is present on karmic but not jaunty.
>
> John
>
>
>
>   

Hereafter the response from gstreamer list :

On Mon, 2009-11-16 at 11:37 -0800, Ron McOuat wrote:

> > I had the same problem. The tutorial version of the code for handling 
> > the assignment of the "prepare-xwindow-id" message is incomplete. 
> > Looking in the example code under gst-python reveals a few more steps. I 
> > changed the tutorial code to look like the following and it worked.
> > 
> >     def on_sync_message(self, bus, message):
> >         if message.structure is None:
> >             return
> >                 
> >         if message.structure.get_name() == "prepare-xwindow-id":           
> >             # Assign the viewport
> >             gtk.gdk.threads_enter()
> >             gtk.gdk.display_get_default().sync()
> >             imagesink = message.src
> >             imagesink.set_property("force-aspect-ratio", True)
> >             imagesink.set_xwindow_id(self.movie_window.window.xid)
> >             gtk.gdk.threads_leave()
>   

This is due to GTK+ making a subtle change in the handling of GdkWindow
XIDs, for the Client Side Windows support. You now need to be sure to
take the GDK lock, because they replaced a simple accessor macro with a
function that tries to create a native X server window if one doesn't
yet exist.

See bug https://bugzilla.gnome.org/show_bug.cgi?id=599885

> > The code form the examples directory in gst-python is not the same as 
> > above but I pulled in the thread sync code to make it work.
> > 
> > Here is the code (commented out) from the examples
> > 
> >             # Example code from
> >             # 
> > http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/maemogst.py
> >             #
> >             # all this is needed to sync with the X server before giving the
> >             # x id to the sink
> >             #gtk.gdk.threads_enter()
> >             #gtk.gdk.display_get_default().sync()
> >             #self.video_widget.set_sink(message.src)
> >             #message.src.set_property("force-aspect-ratio", True)
> >             #gtk.gdk.threads_leave()
> > 
> > 
> > 
> > I have also had trouble with the NVidia X server not displaying the 
> > video with the proper colour map. If I move a recorded file off a cam to 
> > another machine it displays the correct colour map but I am sure that is 
> > a separate issue.
>   

I had this (one time) issue as well. Going into Totem, opening the
Preferences->Display tab, and resetting the Hue slider to the center
fixes it. I think NVidia changed the meaning of the Hue slider values,
making totem's cached value actually cause incorrect hue.

J.
 



_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to