Commit 442722be authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

gst-libs/gst/riff/riff-media.c: Add support for 24bpp DIB (#305279).

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
Add support for 24bpp DIB (#305279).
parent 3150ac3b
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
Add support for 24bpp DIB (#305279).
2006-03-14 Wim Taymans <wim@fluendo.com>
 
* gst-libs/gst/video/gstvideofilter.c: (gst_video_filter_init):
......
......@@ -56,16 +56,35 @@ gst_riff_create_video_caps (guint32 codec_fcc,
GstBuffer *palette = NULL;
switch (codec_fcc) {
case GST_MAKE_FOURCC ('D', 'I', 'B', ' '):
caps = gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, 8,
"depth", G_TYPE_INT, 8, "endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
case GST_MAKE_FOURCC ('D', 'I', 'B', ' '):{
gint bpp = (strf && strf->bit_cnt != 0) ? strf->bit_cnt : 8;
if (strf) {
if (bpp == 8) {
caps = gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, 8, "depth", G_TYPE_INT, 8,
"endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
} else if (bpp == 24) {
caps = gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24,
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
"red_mask", G_TYPE_INT, 0xff, "green_mask", G_TYPE_INT, 0xff00,
"blue_mask", G_TYPE_INT, 0xff0000, NULL);
} else {
GST_WARNING ("Unhandled DIB RGB depth: %d", bpp);
}
} else {
/* for template */
caps = gst_caps_from_string ("video/x-raw-rgb, bpp = (int) { 8, 24 }, "
"depth = (int) { 8, 24}");
}
palette = strf_data;
strf_data = NULL;
if (codec_name)
*codec_name = g_strdup ("Palettized 8-bit RGB");
*codec_name = g_strdup_printf ("Palettized %d-bit RGB", bpp);
break;
}
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment