Commit 0e9fe263 authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2: Enable VP9 format

This was missing, preventing the encoder and decoder to work
properly. This also adds support for camera that would produce
VP9 (if that exists).
parent a13c24dc
...@@ -181,6 +181,7 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = { ...@@ -181,6 +181,7 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
{V4L2_PIX_FMT_VC1_ANNEX_G, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_VC1_ANNEX_G, FALSE, GST_V4L2_CODEC},
{V4L2_PIX_FMT_VC1_ANNEX_L, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_VC1_ANNEX_L, FALSE, GST_V4L2_CODEC},
{V4L2_PIX_FMT_VP8, FALSE, GST_V4L2_CODEC | GST_V4L2_NO_PARSE}, {V4L2_PIX_FMT_VP8, FALSE, GST_V4L2_CODEC | GST_V4L2_NO_PARSE},
{V4L2_PIX_FMT_VP9, FALSE, GST_V4L2_CODEC | GST_V4L2_NO_PARSE},
/* Vendor-specific formats */ /* Vendor-specific formats */
{V4L2_PIX_FMT_WNVA, TRUE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_WNVA, TRUE, GST_V4L2_CODEC},
...@@ -1412,6 +1413,9 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc) ...@@ -1412,6 +1413,9 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc)
case V4L2_PIX_FMT_VP8: case V4L2_PIX_FMT_VP8:
structure = gst_structure_new_empty ("video/x-vp8"); structure = gst_structure_new_empty ("video/x-vp8");
break; break;
case V4L2_PIX_FMT_VP9:
structure = gst_structure_new_empty ("video/x-vp9");
break;
case V4L2_PIX_FMT_GREY: /* 8 Greyscale */ case V4L2_PIX_FMT_GREY: /* 8 Greyscale */
case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16:
case V4L2_PIX_FMT_Y16_BE: case V4L2_PIX_FMT_Y16_BE:
...@@ -1779,6 +1783,8 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, ...@@ -1779,6 +1783,8 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
fourcc = V4L2_PIX_FMT_H264; fourcc = V4L2_PIX_FMT_H264;
} else if (g_str_equal (mimetype, "video/x-vp8")) { } else if (g_str_equal (mimetype, "video/x-vp8")) {
fourcc = V4L2_PIX_FMT_VP8; fourcc = V4L2_PIX_FMT_VP8;
} else if (g_str_equal (mimetype, "video/x-vp9")) {
fourcc = V4L2_PIX_FMT_VP9;
} else if (g_str_equal (mimetype, "video/x-bayer")) { } else if (g_str_equal (mimetype, "video/x-bayer")) {
const gchar *format = gst_structure_get_string (structure, "format"); const gchar *format = gst_structure_get_string (structure, "format");
if (format) { if (format) {
......
...@@ -1029,6 +1029,8 @@ G_STMT_START { \ ...@@ -1029,6 +1029,8 @@ G_STMT_START { \
SET_META ("VC1"); SET_META ("VC1");
} else if (gst_structure_has_name (s, "video/x-vp8")) { } else if (gst_structure_has_name (s, "video/x-vp8")) {
SET_META ("VP8"); SET_META ("VP8");
} else if (gst_structure_has_name (s, "video/x-vp9")) {
SET_META ("VP9");
} else if (gst_structure_has_name (s, "video/x-bayer")) { } else if (gst_structure_has_name (s, "video/x-bayer")) {
SET_META ("BAYER"); SET_META ("BAYER");
} else if (gst_structure_has_name (s, "video/x-sonix")) { } else if (gst_structure_has_name (s, "video/x-sonix")) {
......
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