Fix 24bppLE RGB

Original commit message from CVS:
Fix 24bppLE RGB
This commit is contained in:
Ronald S. Bultje 2003-12-23 22:41:37 +00:00
parent 46cf214479
commit b366c56da2
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2003-12-23 Ronald Bultje <rbultje@ronald.bitfreak.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get):
Fix for 24bpp display.
2003-12-23 Colin Walters <walters@verbum.org>
* ext/gnomevfs/gstgnomevfssink.c: Add ARG_HANDLE property that takes

View file

@ -455,9 +455,14 @@ gst_ximagesink_xcontext_get (GstXImageSink *ximagesink)
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->visual->red_mask = GUINT32_TO_BE (xcontext->visual->red_mask);
xcontext->visual->green_mask = GUINT32_TO_BE (xcontext->visual->green_mask);
xcontext->visual->blue_mask = GUINT32_TO_BE (xcontext->visual->blue_mask);
if (xcontext->bpp == 24) {
xcontext->visual->red_mask >>= 8;
xcontext->visual->green_mask >>= 8;
xcontext->visual->blue_mask >>= 8;
}
}
xcontext->caps = gst_caps_new_simple ("video/x-raw-rgb",