WebcamTracker/WebcamTracker.cc
josh 7d1f710d57 added Makefile and initial WebcamTracker.cc
git-svn-id: svn://anubis/misc/WebcamTracker@119 bd8a9e45-a331-0410-811e-c64571078777
2009-08-06 00:53:16 +00:00

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);
}