Gtk and threading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There was a recent discussion about Gtk and threading--I have some
more questions.

I have a separate thread that is running capturing video data from a
camera. Seems to me that this needs its separate thread. In my main
thread I am running a Gtk application that I want to display the
images from the camera. However, I am having problems getting this to
work together.

Everybody is saying that all of my Gtk processing should be done in
the main thread, and indeed, whenever I use a Gtk/Gdk routine in my
camera thread I get Xlib async errors.  But then how do I trigger a
render from my camera thread whenever my camera buffer gets a new
video frame without calling a Gtk/Gdk API routine?

I currently have a common memory buffer that both threads have access
to. But the Gdk_pixbuf routines seem to be double buffering the data
so I have to use a Gdk_draw routine to have my common memory rendered.

Any suggestions or help is appreciated.

-Andres




_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux