1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

print a hint when trying V4L2 on V4L device

Originally committed as revision 5065 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Alex Beregszaszi 2006-02-26 13:22:32 +00:00
parent 6df5f6ae51
commit c16601bb8e

View File

@ -122,6 +122,13 @@ static int device_open(const char *devname, uint32_t *capabilities)
} }
res = ioctl(fd, VIDIOC_QUERYCAP, &cap); res = ioctl(fd, VIDIOC_QUERYCAP, &cap);
// ENOIOCTLCMD definition only availble on __KERNEL__
if (res < 0 && errno == 515)
{
av_log(NULL, AV_LOG_ERROR, "QUERYCAP not implemented, probably V4L device but not supporting V4L2\n");
return -1;
}
if (res < 0) { if (res < 0) {
av_log(NULL, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYCAP): %s\n", av_log(NULL, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYCAP): %s\n",
strerror(errno)); strerror(errno));