On 11/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Nov 30, 2007 2:45 AM, Bin Chen <[EMAIL PROTECTED]> wrote:
> > image, but I am not familiar with XLib, so I want to know if it is
> > possible to use pure GTK+ API to achieve this? What about the
> > performance comparing to use XLib directly?
>
> You can use gdk_draw_rgb_image() to paint an RGB array to the screen:
>
> http://library.gnome.org/devel/gdk/unstable/gdk-GdkRGB.html#gdk-draw-rgb-image
>
> This is a wrapper over the XImage functions, including XShm when
> available, plus some nice dithering code. It's about as quick as you
> can get with vanilla X11 calls. There's a tiny program in
> gtk+-2.x.x/tests/testrgb.c which benchmarks your computer for drawing
> speed with his operation. You could try that and see if it's going to
> be quick enough for you.
>
> If you want to go faster, you need to use another (non-X11) rendering
> path. One possibility is the Xv extension, another is to go via
> OpenGL. Both are somewhat hairy :-( and much less portable. As Ken
> says, unless you really want to do this all yourself, GStreamer might
> be the way to go.
>
Thanks.

Actually I have buy a propriatary codec library from a vendor, the lib
decodes all the known compressed format to a frame of RGB array. So
what I want to do is just fill the array into the window.
Thanks for you input, its very useful!

Bin
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to