This article is about using "Video for Linux" on maemo and requires some knowledge of maemo as this is a fairly in-depth article using Linux port.
Video4linux – V4L (Video for Linux) is an API that offers access to capture devices such as web-cams, video/TV cards, radio cards, and others. Nowadays it is in its second version (V4L2 – Video for Linux 2). V4L/V4L2 are both integrated with latest Linux Kernels, therefore, with maemo distribution.
Basically, V4L/V4L2 work sending predefined structures to opened Linux devices. For example, the following code snippet shows how to retrieve capabilities from a specific device:
#define DEFAULT_DEVICE "/dev/video0"
struct v4l2_capability vc;
//Open the device, for example /dev/video0, or /dev/radio0
int fd = open(DEFAULT_DEVICE, O_RDONLY);
//Send structure to the opened device using V4L2 API
ioctl(fd, VIDIOC_QUERYCAP, &vc);