From cc8dc11b7516e4810f8d5e8a3b5a85cde72490c8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 24 Feb 2013 08:46:52 +0100 Subject: v4l2-drm-example: Use /dev/video0 by default Use /dev/video0 as the video node when the -i option is missing. Signed-off-by: Laurent Pinchart --- v4l2-drm-example/dmabuf-sharing.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'v4l2-drm-example') diff --git a/v4l2-drm-example/dmabuf-sharing.c b/v4l2-drm-example/dmabuf-sharing.c index 35cb38c..d1f93f4 100644 --- a/v4l2-drm-example/dmabuf-sharing.c +++ b/v4l2-drm-example/dmabuf-sharing.c @@ -126,7 +126,7 @@ static void usage(char *name) fprintf(stderr, "usage: %s [-bFfhiMoSst]\n", name); fprintf(stderr, "\nCapture options:\n\n"); - fprintf(stderr, "\t-i \tset video node like /dev/video*\n"); + fprintf(stderr, "\t-i \tset video node (default: /dev/video0)\n"); fprintf(stderr, "\t-f \tset input format using 4cc\n"); fprintf(stderr, "\t-S \tset input resolution\n"); fprintf(stderr, "\t-s @\tset crop area\n"); @@ -158,6 +158,8 @@ static int parse_args(int argc, char *argv[], struct setup *s) int c, ret; memset(s, 0, sizeof(*s)); + strcpy(s->video, "/dev/video0"); + while ((c = getopt(argc, argv, "b:F:f:hi:M:o:S:s:t:")) != -1) { switch (c) { case 'b': @@ -457,7 +459,6 @@ int main(int argc, char *argv[]) ret = parse_args(argc, argv, &s); BYE_ON(ret, "failed to parse arguments\n"); BYE_ON(s.module[0] == 0, "DRM module is missing\n"); - BYE_ON(s.video[0] == 0, "video node is missing\n"); memset(&v4l2, 0, sizeof v4l2); v4l2.devname = s.video; -- cgit v1.2.3