summaryrefslogtreecommitdiff
path: root/trunk/src/list_v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/list_v4l.c')
-rw-r--r--trunk/src/list_v4l.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/trunk/src/list_v4l.c b/trunk/src/list_v4l.c
new file mode 100644
index 000000000..a01a9dc0f
--- /dev/null
+++ b/trunk/src/list_v4l.c
@@ -0,0 +1,35 @@
+
+#include <glib.h>
+#include "video-dev.h"
+
+static void
+list_v4l (void)
+{
+ GList *devs, *l;
+ VideoDev *dev;
+
+ devs = scan_for_video_devices ();
+
+ if (devs == NULL)
+ {
+ g_print ("No v4l devices\n");
+ return;
+ }
+
+ for (l = devs; l != NULL; l = l->next)
+ {
+ dev = l->data;
+
+ g_print ("name: %s \ndevice: %s\n",
+ dev->display_name, dev->device);
+ if (l->next != NULL)
+ g_print ("\n");
+ }
+}
+
+int main (int argc, char **argv)
+{
+ list_v4l ();
+ return 0;
+}
+