v4l_id.c revision 3f65d73149cd0f64eb3fdb0c71f55f6c1133fefe
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/*
* Copyright (C) 2009 Kay Sievers <kay@vrfy.org>
* Copyright (c) 2009 Filippo Argiolas <filippo.argiolas@gmail.com>
*
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details:
*/
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <linux/videodev2.h>
#include "fd-util.h"
#include "util.h"
{}
};
char *device;
struct v4l2_capability v2cap;
int c;
switch (c) {
case 'h':
printf("%s [-h,--help] <device file>\n\n"
"Video4Linux device identification.\n\n"
" -h Print this message\n"
return 0;
case '?':
return -EINVAL;
default:
assert_not_reached("Unhandled option");
}
return 2;
if (fd < 0)
return 3;
printf("ID_V4L_VERSION=2\n");
printf("ID_V4L_CAPABILITIES=:");
printf("capture:");
printf("video_output:");
printf("video_overlay:");
printf("audio:");
printf("tuner:");
printf("radio:");
printf("\n");
}
return 0;
}