|
|
|
@ -414,7 +414,7 @@ int V4L2_Base::init_mmap(char *errmsg)
|
|
|
|
|
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
|
|
|
req.memory = V4L2_MEMORY_MMAP;
|
|
|
|
|
|
|
|
|
|
if (-1 == xioctl (fd, VIDIOC_RETQBUFS, &req)) {
|
|
|
|
|
if (-1 == xioctl (fd, VIDIOC_REQBUFS, &req)) {
|
|
|
|
|
if (EINVAL == errno) {
|
|
|
|
|
fprintf (stderr, "%s does not support "
|
|
|
|
|
"memory mapping\n", dev_name);
|
|
|
|
@ -422,7 +422,7 @@ int V4L2_Base::init_mmap(char *errmsg)
|
|
|
|
|
"memory mapping\n", dev_name);
|
|
|
|
|
return -1;
|
|
|
|
|
} else {
|
|
|
|
|
return errno_exit ("VIDIOC_RETQBUFS", errmsg);
|
|
|
|
|
return errno_exit ("VIDIOC_REQBUFS", errmsg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -482,13 +482,13 @@ void V4L2_Base::init_userp(unsigned int buffer_size)
|
|
|
|
|
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
|
|
|
req.memory = V4L2_MEMORY_USERPTR;
|
|
|
|
|
|
|
|
|
|
if (-1 == xioctl (fd, VIDIOC_RETQBUFS, &req)) {
|
|
|
|
|
if (-1 == xioctl (fd, VIDIOC_REQBUFS, &req)) {
|
|
|
|
|
if (EINVAL == errno) {
|
|
|
|
|
fprintf (stderr, "%s does not support "
|
|
|
|
|
"user pointer i/o\n", dev_name);
|
|
|
|
|
exit (EXIT_FAILURE);
|
|
|
|
|
} else {
|
|
|
|
|
errno_exit ("VIDIOC_RETQBUFS", errmsg);
|
|
|
|
|
errno_exit ("VIDIOC_REQBUFS", errmsg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|