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'...

Original commit message from CVS:
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...
This commit is contained in:
Ronald S. Bultje 2003-12-17 22:37:26 +00:00
parent b43a45315a
commit efa3c21fdd

View file

@ -449,6 +449,15 @@ gst_ximagesink_xcontext_get (GstXImageSink *ximagesink)
} }
#endif /* HAVE_XSHM */ #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", xcontext->caps = GST_CAPS_NEW ("ximagesink_ximage_caps", "video/x-raw-rgb",
"bpp", GST_PROPS_INT (xcontext->bpp), "bpp", GST_PROPS_INT (xcontext->bpp),
"depth", GST_PROPS_INT (xcontext->depth), "depth", GST_PROPS_INT (xcontext->depth),