Display video under GTK+



Hi,

I am trying to display video under GTK+. I am using the function:

    gdk_draw_rgb_image (darea->window,
	darea->style->fg_gc[GTK_STATE_NORMAL],
        X_START, Y_START, COL_MAX, ROW_MAX,
        GDK_RGB_DITHER_MAX, pBufferRGB, COL_MAX * 3);
   // GDK_RGB_DITHER_NORMAL, GDK_RGB_DITHER_MAX

The RGB data in the buffer is 24 bits. The video is blurred, and color 
disappears.

Any advices are highly appreciated.

Daniel


>From: Gary Wong <gary@CS.Arizona.EDU>
>Reply-To: gtk-list@redhat.com
>To: gtk-list@redhat.com
>Subject: [gtk-list] gdk_draw_pixmap, bitmaps, and XCopyPlane
>Date: Wed, 8 Mar 2000 15:24:22 -0700 (MST)
>
>Hi,
>
>   I'm an old Xlib programmer starting out with GTK+.  I'm porting some
>old code of mine and have run into trouble with bitmap manipulation
>code -- I don't seem to be able to find a GDK equivalent to
>XCopyPlane().  gdk_draw_pixmap (i.e. gdk_draw_drawable) will do the
>job in some circumstances, but I can't find anything capable of
>copying between drawables of differing depths.  If I include <gdk/gdkx.h>
>I can call XCopyPlane myself, of course, but that's fairly ugly.
>
>   What I would like is this function:
>
>void
>gdk_draw_bitplane (GdkDrawable *drawable,
>                    GdkGC       *gc,
>                    GdkDrawable *src,
>                    gint         xsrc,
>                    gint         ysrc,
>                    gint         xdest,
>                    gint         ydest,
>                    gint         width,
>                    gint         height,
>                    gulong       plane)
>
>gdk_draw_bitplane would be to XCopyPlane what gdk_draw_pixmap
>(gdk_draw_drawable) is to XCopyArea.  I'm happy to write a patch and
>documentation for this function if necessary, but I'd appreciate advice
>from a GDK guru first.
>
>Cheers,
>Gary.
>--
>         Gary Wong, Department of Computer Science, University of Arizona
>             gary@cs.arizona.edu     http://www.cs.arizona.edu/~gary/
>
>--
>To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



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