summaryrefslogtreecommitdiff
path: root/libavformat/v4l2.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2006-02-26 13:22:32 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2006-02-26 13:22:32 +0000
commitc16601bb8eacd26e1cc5b32ed751efce266ab335 (patch)
treeb3b51ee897a6f9fde273782e041af41266c1f038 /libavformat/v4l2.c
parent6df5f6ae51ca3e9f3af760066bc7b3423677a8b4 (diff)
print a hint when trying V4L2 on V4L device
Originally committed as revision 5065 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/v4l2.c')
-rw-r--r--libavformat/v4l2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/v4l2.c b/libavformat/v4l2.c
index 78a0cac52d..4cdfc26e5e 100644
--- a/libavformat/v4l2.c
+++ b/libavformat/v4l2.c
@@ -122,6 +122,13 @@ static int device_open(const char *devname, uint32_t *capabilities)
}
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) {
av_log(NULL, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYCAP): %s\n",
strerror(errno));