25 lines
479 B
C++
25 lines
479 B
C++
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <stdlib.h> /* exit() */
|
|
#include <sys/ioctl.h> /* ioctl() */
|
|
#include <libv4lconvert.h>
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
int fd = open("/dev/video0", O_RDWR);
|
|
if (fd < 0)
|
|
{
|
|
cerr << "bad fd" << endl;
|
|
exit(1);
|
|
}
|
|
|
|
struct v4l2_capability cap;
|
|
ioctl(fd, VIDIOC_QUERYCAP, &cap);
|
|
|
|
close(fd);
|
|
}
|