mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-11 02:24:13 +00:00
v4l2src: Add H264 encoded stream support to the caps
This is not enough to properly support H264 cameras, but it will allow an H264 stream to be generated by v4l2src using the default settings of the camera. If used with the pre-set-format signal, the H264 encoder can be fully configured. Conflicts: sys/v4l2/gstv4l2object.c
This commit is contained in:
parent
06d64c7792
commit
a63451ecd7
1 changed files with 7 additions and 0 deletions
|
@ -880,6 +880,8 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
|
|||
{V4L2_PIX_FMT_DV, TRUE},
|
||||
{V4L2_PIX_FMT_MPEG, FALSE},
|
||||
|
||||
{V4L2_PIX_FMT_H264, TRUE},
|
||||
|
||||
/* Vendor-specific formats */
|
||||
{V4L2_PIX_FMT_WNVA, TRUE},
|
||||
|
||||
|
@ -1199,6 +1201,9 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
|
|||
case V4L2_PIX_FMT_HI240: /* 8 8-bit color */
|
||||
/* FIXME: get correct fourccs here */
|
||||
break;
|
||||
case V4L2_PIX_FMT_H264: /* H.264 */
|
||||
structure = gst_structure_new ("video/x-h264", NULL);
|
||||
break;
|
||||
case V4L2_PIX_FMT_RGB332:
|
||||
case V4L2_PIX_FMT_RGB555X:
|
||||
case V4L2_PIX_FMT_RGB565X:
|
||||
|
@ -1471,6 +1476,8 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
|
|||
fourcc = V4L2_PIX_FMT_DV;
|
||||
} else if (g_str_equal (mimetype, "image/jpeg")) {
|
||||
fourcc = V4L2_PIX_FMT_JPEG;
|
||||
} else if (g_str_equal (mimetype, "video/x-h264")) {
|
||||
fourcc = V4L2_PIX_FMT_H264;
|
||||
#ifdef V4L2_PIX_FMT_SBGGR8
|
||||
} else if (g_str_equal (mimetype, "video/x-bayer")) {
|
||||
fourcc = V4L2_PIX_FMT_SBGGR8;
|
||||
|
|
Loading…
Reference in a new issue