Hans de Goede wrote:
The compat header will just make things compile, it replaces
linux/videodev.h, but does not do anything magic to make the app actually
work with v4l2 devices all of a sudden, iow the app will still try to talk
the v4l1 API to any /dev/video nodes.
Oh, I didn't notice that he was talking about using only the videodev.h
replacement.
To use the v4l1 compat layer libv4l comes with, you need to:
1) #include <libv4l1.h>
2) replace open("/dev/video0", ...) with v4l1_open("/dev/video0",
...)
3) replace ioctl(video_fd, ...) with v4l1_ioctl(video_fd, ...)
4) idem for read / mmap / munmap (on a ptr coming from v4l1_mmap) & close
5) Add -lv4l1 to LD_FLAGS
Thanks for this clarification.
Kevin Kofler