diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 5 |
2 files changed, 14 insertions, 0 deletions
@@ -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), diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 30f7bd8f..273a641a 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -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) |