summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-08-02 21:13:55 (GMT)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-08-02 21:13:55 (GMT)
commit0e9fe263caef71d265f686e769d5a6d40713fd93 (patch)
tree8a15e60174a657913d57407cef38cb43029ae42b
parenta13c24dc8c5a92aaa4db8912868b6bf9f55b0906 (diff)
downloadgst-plugins-good-0e9fe263caef71d265f686e769d5a6d40713fd93.tar.gz
gst-plugins-good-0e9fe263caef71d265f686e769d5a6d40713fd93.tar.xz
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).
-rw-r--r--sys/v4l2/gstv4l2object.c6
-rw-r--r--sys/v4l2/gstv4l2videodec.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index f902a82..af62d6d 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -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_L, FALSE, GST_V4L2_CODEC},
{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 */
{V4L2_PIX_FMT_WNVA, TRUE, GST_V4L2_CODEC},
@@ -1412,6 +1413,9 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc)
case V4L2_PIX_FMT_VP8:
structure = gst_structure_new_empty ("video/x-vp8");
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_Y16:
case V4L2_PIX_FMT_Y16_BE:
@@ -1779,6 +1783,8 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
fourcc = V4L2_PIX_FMT_H264;
} else if (g_str_equal (mimetype, "video/x-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")) {
const gchar *format = gst_structure_get_string (structure, "format");
if (format) {
diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c
index 29fbfb9..8e369fa 100644
--- a/sys/v4l2/gstv4l2videodec.c
+++ b/sys/v4l2/gstv4l2videodec.c
@@ -1029,6 +1029,8 @@ G_STMT_START { \
SET_META ("VC1");
} else if (gst_structure_has_name (s, "video/x-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")) {
SET_META ("BAYER");
} else if (gst_structure_has_name (s, "video/x-sonix")) {