From: Ronald B. <rb...@us...> - 2003-12-17 22:37:40
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: rbultje Date: Wed Dec 17 2003 14:37:38 PST Log message: Fix LE caps on bpp=24/32. Our docs currently say that these are BE only. I disagree, but still, it's our spec so let's keep to it for now... Modified files: sys/ximage : ximagesink.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/sys/ximage/ximagesink.c.diff?r1=1.28&r2=1.29 ====Begin Diffs==== Index: ximagesink.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/sys/ximage/ximagesink.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ximagesink.c 12 Dec 2003 16:49:22 -0000 1.28 +++ ximagesink.c 17 Dec 2003 22:37:26 -0000 1.29 @@ -448,6 +448,15 @@ GST_DEBUG ("ximagesink is not using XShm extension"); } #endif /* HAVE_XSHM */ + + /* our caps system handles 24/32bpp RGB as big-endian. */ + if ((xcontext->bpp == 24 || xcontext->bpp == 32) && + xcontext->endianness == G_LITTLE_ENDIAN) { + xcontext->endianness = G_BIG_ENDIAN; + xcontext->visual->red_mask = GULONG_TO_BE (xcontext->visual->red_mask); + xcontext->visual->green_mask = GULONG_TO_BE (xcontext->visual->green_mask); + xcontext->visual->blue_mask = GULONG_TO_BE (xcontext->visual->blue_mask); + } xcontext->caps = GST_CAPS_NEW ("ximagesink_ximage_caps", "video/x-raw-rgb", "bpp", GST_PROPS_INT (xcontext->bpp), |