v4l2object: Add vp8 support
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 16 Dec 2013 22:29:30 +0000 (17:29 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 10 Jan 2014 22:13:23 +0000 (17:13 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=720568

sys/v4l2/gstv4l2object.c

index 67b35c5..a3ea88c 100644 (file)
@@ -1039,6 +1039,9 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
 #ifdef V4L2_PIX_FMT_H264
   {V4L2_PIX_FMT_H264, TRUE, GST_V4L2_CODEC},
 #endif
+#ifdef V4L2_PIX_FMT_VP8
+  {V4L2_PIX_FMT_VP8, TRUE, GST_V4L2_CODEC},
+#endif
 
   /*  Vendor-specific formats   */
   {V4L2_PIX_FMT_WNVA, TRUE, GST_V4L2_CODEC},
@@ -1489,6 +1492,11 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
           G_TYPE_STRING, "au", NULL);
       break;
 #endif
+#ifdef V4L2_PIX_FMT_VP8
+    case V4L2_PIX_FMT_VP8:
+      structure = gst_structure_new_empty ("video/x-vp8");
+      break;
+#endif
     case V4L2_PIX_FMT_RGB332:
     case V4L2_PIX_FMT_RGB555X:
     case V4L2_PIX_FMT_RGB565X:
@@ -1781,6 +1789,10 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
     } else if (g_str_equal (mimetype, "video/x-h264")) {
       fourcc = V4L2_PIX_FMT_H264;
 #endif
+#ifdef V4L2_PIX_FMT_VP8
+    } else if (g_str_equal (mimetype, "video/x-vp8")) {
+      fourcc = V4L2_PIX_FMT_VP8;
+#endif
 #ifdef V4L2_PIX_FMT_SBGGR8
     } else if (g_str_equal (mimetype, "video/x-bayer")) {
       fourcc = V4L2_PIX_FMT_SBGGR8;