diff options
Diffstat (limited to 'common/recipes-multimedia/gstreamer/gst-plugins-good/0024-v4l2src-fix-RGB32-colorspace-deinitions.patch')
-rw-r--r-- | common/recipes-multimedia/gstreamer/gst-plugins-good/0024-v4l2src-fix-RGB32-colorspace-deinitions.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/common/recipes-multimedia/gstreamer/gst-plugins-good/0024-v4l2src-fix-RGB32-colorspace-deinitions.patch b/common/recipes-multimedia/gstreamer/gst-plugins-good/0024-v4l2src-fix-RGB32-colorspace-deinitions.patch new file mode 100644 index 0000000..e141df9 --- /dev/null +++ b/common/recipes-multimedia/gstreamer/gst-plugins-good/0024-v4l2src-fix-RGB32-colorspace-deinitions.patch @@ -0,0 +1,69 @@ +From e7782d58ed397e0f66cbb62b5c59f3adea8227c4 Mon Sep 17 00:00:00 2001 +From: Kazunori Kobayashi <kkobayas@igel.co.jp> +Date: Mon, 16 Apr 2012 11:05:07 +0900 +Subject: [PATCH 24/31] v4l2src: fix RGB32 colorspace deinitions + +This patch makes RGB32 colorspace definitions used in the caps negotiation +suitable for actual v4l2 driver's output format. +--- + sys/v4l2/gstv4l2object.c | 24 +++++++++++++++--------- + 1 file changed, 15 insertions(+), 9 deletions(-) + +diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c +index 81d1cb7..0678305 100644 +--- a/sys/v4l2/gstv4l2object.c ++++ b/sys/v4l2/gstv4l2object.c +@@ -1208,14 +1208,16 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc) + b_mask = 0xff0000; + break; + case V4L2_PIX_FMT_RGB32: +- bpp = depth = 32; ++ bpp = 32; ++ depth = 24; + endianness = G_BIG_ENDIAN; +- r_mask = 0xff000000; +- g_mask = 0x00ff0000; +- b_mask = 0x0000ff00; ++ r_mask = 0x00ff0000; ++ g_mask = 0x0000ff00; ++ b_mask = 0x000000ff; + break; + case V4L2_PIX_FMT_BGR32: +- bpp = depth = 32; ++ bpp = 32; ++ depth = 24; + endianness = G_BIG_ENDIAN; + r_mask = 0x000000ff; + g_mask = 0x0000ff00; +@@ -1480,9 +1482,10 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, + #endif + } + } else if (!strcmp (mimetype, "video/x-raw-rgb")) { +- gint depth, endianness, r_mask; ++ gint depth, bpp, endianness, r_mask; + + gst_structure_get_int (structure, "depth", &depth); ++ gst_structure_get_int (structure, "bpp", &bpp); + gst_structure_get_int (structure, "endianness", &endianness); + gst_structure_get_int (structure, "red_mask", &r_mask); + +@@ -1499,10 +1502,13 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, + V4L2_PIX_FMT_RGB565 : V4L2_PIX_FMT_RGB565X; + break; + case 24: +- fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR24 : V4L2_PIX_FMT_RGB24; +- break; + case 32: +- fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32; ++ if (bpp == 24) ++ fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR24 : V4L2_PIX_FMT_RGB24; ++ else if (bpp == 32) ++ fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32; ++ else ++ GST_ERROR_OBJECT (v4l2object, "Invalid value bpp = %d", bpp); + break; + } + } else if (strcmp (mimetype, "video/x-dv") == 0) { +-- +1.7.9.5 + |