v4l2src: also log pixel formats in sorted order
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 6 Aug 2010 19:04:59 +0000 (20:04 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 6 Aug 2010 19:07:26 +0000 (20:07 +0100)
sys/v4l2/gstv4l2object.c

index c77da5e..84f2281 100644 (file)
@@ -912,7 +912,20 @@ gst_v4l2_object_fill_format_list (GstV4l2Object * v4l2object)
         (GCompareFunc) format_cmp_func);
   }
 
-  GST_DEBUG_OBJECT (v4l2object->element, "got %d format(s)", n);
+#ifndef GST_DISABLE_GST_DEBUG
+  {
+    GSList *l;
+
+    GST_INFO_OBJECT (v4l2object->element, "got %d format(s):", n);
+    for (l = v4l2object->formats; l != NULL; l = l->next) {
+      format = l->data;
+
+      GST_INFO_OBJECT (v4l2object->element,
+          "  %" GST_FOURCC_FORMAT "%s", GST_FOURCC_ARGS (format->pixelformat),
+          ((format->flags & V4L2_FMT_FLAG_EMULATED)) ? " (emulated)" : "");
+    }
+  }
+#endif
 
   return TRUE;