Gtk and threading
- From: "Andres Gonzalez" <gonzo agoralabs com>
- To: "Gtk-List" <gtk-list gnome org>
- Subject: Gtk and threading
- Date: Mon, 17 Dec 2007 16:01:06 -0500
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]