Commit 7ff514fe authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2: Correctly map RGB32 format

In v4l2 specification, RGB32 has the alpha, or pading, first, not last.
See http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html .

https://bugzilla.gnome.org/show_bug.cgi?id=540941
parent 14ceb572
......@@ -1093,7 +1093,7 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc)
format = GST_VIDEO_FORMAT_BGR;
break;
case V4L2_PIX_FMT_RGB32:
format = GST_VIDEO_FORMAT_RGBx;
format = GST_VIDEO_FORMAT_xRGB;
break;
case V4L2_PIX_FMT_BGR32:
format = GST_VIDEO_FORMAT_BGRx;
......@@ -1430,8 +1430,8 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
case GST_VIDEO_FORMAT_BGR:
fourcc = V4L2_PIX_FMT_BGR24;
break;
case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_RGBA:
case GST_VIDEO_FORMAT_xRGB:
case GST_VIDEO_FORMAT_ARGB:
fourcc = V4L2_PIX_FMT_RGB32;
break;
case GST_VIDEO_FORMAT_BGRx:
......
Markdown is supported
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