Can gdk image attach to a window?
- From: Binary Chen <binary chen gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Can gdk image attach to a window?
- Date: Thu, 06 Dec 2007 18:37:25 +0800
Hi,
I am writing a video player using a commercial codec library. The
library will callback my function when one frame of video has been
decoded. The decoded frame is placed in a memory which is set by me. And
the callback is started in another thead different from main thread.
I know xlib has big problem when using in multi threaded environment. So
I can't update a widget that is created in main thread.
The problem comes, if I create all the widget in main thread, then I
can't manipulate the widget in the callback.
So GdkImage helps me, because I can tell the library to put the decoded
bitmap in GdkImage->mem. But how can GdkImage draw to screen
automatically? I only know I can use gdk_draw_image to draw a GdkImage
to a drawing area, this means I need to call this function in main
thread to display the GdkImage, damn!!
Is there any better way? I think if I can "attach" a GdkImage to a
widget then the problem resolved.
Thanks.
Bin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]