sys/v4l2/gstv4l2src.c: Add support for grayscale v4l2 devices. Fixes bug #566616.

Original commit message from CVS:
Patch by: Sascha Hauer <s dot hauer at pengutronix dot de>
Luotao Fu <l dot fu at pengutronix dot de>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
(gst_v4l2_get_caps_info):
Add support for grayscale v4l2 devices. Fixes bug #566616.
This commit is contained in:
Sascha Hauer 2009-01-05 12:30:40 +00:00 committed by Sebastian Dröge
parent 455e24c0a3
commit d576b9fdbe
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Sascha Hauer <s dot hauer at pengutronix dot de>
Luotao Fu <l dot fu at pengutronix dot de>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
(gst_v4l2_get_caps_info):
Add support for grayscale v4l2 devices. Fixes bug #566616.
2009-01-05 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
* gst/qtdemux/qtdemux.c: (qtdemux_tag_add_str),

View file

@ -675,6 +675,9 @@ gst_v4l2src_v4l2fourcc_to_structure (guint32 fourcc)
break;
}
case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
structure = gst_structure_new ("video/x-raw-gray",
"bpp", G_TYPE_INT, 8, NULL);
break;
case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */
case V4L2_PIX_FMT_HI240: /* 8 8-bit color */
/* FIXME: get correct fourccs here */
@ -1017,6 +1020,8 @@ gst_v4l2_get_caps_info (GstV4l2Src * v4l2src, GstCaps * caps,
} else if (strcmp (mimetype, "video/x-pwc2") == 0) {
fourcc = V4L2_PIX_FMT_PWC2;
#endif
} else if (strcmp (mimetype, "video/x-raw-gray") == 0) {
fourcc = V4L2_PIX_FMT_GREY;
}
if (fourcc == 0)