mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-12 11:26:39 +00:00
sys/v4l2/gstv4l2src.c: fix Y41P (was typo'ed to
Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_caps), (gst_v4l2_fourcc_from_structure): Add Y41B/Y42B YUV formats (see #125732), fix Y41P (was typo'ed to Y41B somewhere).
This commit is contained in:
parent
d21b3b86f5
commit
cd0c26bcc3
2 changed files with 49 additions and 37 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-04-10 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_caps),
|
||||||
|
(gst_v4l2_fourcc_from_structure):
|
||||||
|
Add Y41B/Y42B YUV formats (see #125732), fix Y41P (was typo'ed to
|
||||||
|
Y41B somewhere).
|
||||||
|
|
||||||
2004-04-09 Benjamin Otte <otte@gnome.org>
|
2004-04-09 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
* ext/gnomevfs/gstgnomevfssink.c:
|
* ext/gnomevfs/gstgnomevfssink.c:
|
||||||
|
|
|
@ -467,8 +467,6 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
|
case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
|
||||||
case V4L2_PIX_FMT_YUV422P: /* 16 YVU422 planar */
|
|
||||||
case V4L2_PIX_FMT_YUV411P: /* 16 YVU411 planar */
|
|
||||||
case V4L2_PIX_FMT_NV12: /* 12 Y/CbCr 4:2:0 */
|
case V4L2_PIX_FMT_NV12: /* 12 Y/CbCr 4:2:0 */
|
||||||
case V4L2_PIX_FMT_NV21: /* 12 Y/CrCb 4:2:0 */
|
case V4L2_PIX_FMT_NV21: /* 12 Y/CrCb 4:2:0 */
|
||||||
case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */
|
case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */
|
||||||
|
@ -481,7 +479,9 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc)
|
||||||
case V4L2_PIX_FMT_YUYV:
|
case V4L2_PIX_FMT_YUYV:
|
||||||
case V4L2_PIX_FMT_YVU420:
|
case V4L2_PIX_FMT_YVU420:
|
||||||
case V4L2_PIX_FMT_UYVY:
|
case V4L2_PIX_FMT_UYVY:
|
||||||
case V4L2_PIX_FMT_Y41P:{
|
case V4L2_PIX_FMT_Y41P:
|
||||||
|
case V4L2_PIX_FMT_YUV422P:
|
||||||
|
case V4L2_PIX_FMT_YUV411P:{
|
||||||
guint32 fcc = 0;
|
guint32 fcc = 0;
|
||||||
|
|
||||||
switch (fourcc) {
|
switch (fourcc) {
|
||||||
|
@ -504,8 +504,14 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc)
|
||||||
fcc = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
|
fcc = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
|
||||||
break;
|
break;
|
||||||
case V4L2_PIX_FMT_Y41P:
|
case V4L2_PIX_FMT_Y41P:
|
||||||
|
fcc = GST_MAKE_FOURCC ('Y', '4', '1', 'P');
|
||||||
|
break;
|
||||||
|
case V4L2_PIX_FMT_YUV411P:
|
||||||
fcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
|
fcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
|
||||||
break;
|
break;
|
||||||
|
case V4L2_PIX_FMT_YUV422P:
|
||||||
|
fcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
@ -569,11 +575,7 @@ gst_v4l2_fourcc_from_structure (GstStructure * structure)
|
||||||
guint32 fourcc = 0;
|
guint32 fourcc = 0;
|
||||||
const gchar *mimetype = gst_structure_get_name (structure);
|
const gchar *mimetype = gst_structure_get_name (structure);
|
||||||
|
|
||||||
if (!strcmp (mimetype, "video/x-raw-yuv") ||
|
if (!strcmp (mimetype, "video/x-raw-yuv")) {
|
||||||
!strcmp (mimetype, "video/x-raw-rgb")) {
|
|
||||||
if (!strcmp (mimetype, "video/x-raw-rgb"))
|
|
||||||
fourcc = GST_MAKE_FOURCC ('R', 'G', 'B', ' ');
|
|
||||||
else
|
|
||||||
gst_structure_get_fourcc (structure, "format", &fourcc);
|
gst_structure_get_fourcc (structure, "format", &fourcc);
|
||||||
|
|
||||||
switch (fourcc) {
|
switch (fourcc) {
|
||||||
|
@ -593,7 +595,14 @@ gst_v4l2_fourcc_from_structure (GstStructure * structure)
|
||||||
case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
|
case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
|
||||||
fourcc = V4L2_PIX_FMT_YVU420;
|
fourcc = V4L2_PIX_FMT_YVU420;
|
||||||
break;
|
break;
|
||||||
case GST_MAKE_FOURCC ('R', 'G', 'B', ' '):{
|
case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
|
||||||
|
fourcc = V4L2_PIX_FMT_YUV411P;
|
||||||
|
break;
|
||||||
|
case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
|
||||||
|
fourcc = V4L2_PIX_FMT_YUV422P;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (!strcmp (mimetype, "video/x-raw-rgb")) {
|
||||||
gint depth, endianness, r_mask;
|
gint depth, endianness, r_mask;
|
||||||
|
|
||||||
gst_structure_get_int (structure, "depth", &depth);
|
gst_structure_get_int (structure, "depth", &depth);
|
||||||
|
@ -619,10 +628,6 @@ gst_v4l2_fourcc_from_structure (GstStructure * structure)
|
||||||
fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32;
|
fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (strcmp (mimetype, "video/x-dv") == 0) {
|
} else if (strcmp (mimetype, "video/x-dv") == 0) {
|
||||||
fourcc = V4L2_PIX_FMT_DV;
|
fourcc = V4L2_PIX_FMT_DV;
|
||||||
} else if (strcmp (mimetype, "video/x-jpeg") == 0) {
|
} else if (strcmp (mimetype, "video/x-jpeg") == 0) {
|
||||||
|
|
Loading…
Reference in a new issue