v4l2: fix build on systems with older kernel headers

* v4l2.c (print_v4l2_format_fmt): Do not use
V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY unless it is defined.
(v4l2_ioctl): Do not use VIDIOC_ENUM_FRAMESIZES and
VIDIOC_ENUM_FRAMEINTERVALS unless they are defined.
This commit is contained in:
Дмитрий Левин 2015-01-09 04:53:19 +00:00
parent 08b6397d13
commit 197db577e8

6
v4l2.c
View File

@ -126,7 +126,9 @@ static void print_v4l2_format_fmt(const struct v4l2_format *f)
/* TODO: Complete this switch statement */
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
#endif
tprints("win={???}");
break;
@ -173,6 +175,7 @@ v4l2_ioctl(struct tcb *tcp, unsigned long code, long arg)
return 1;
}
#ifdef VIDIOC_ENUM_FRAMESIZES
case VIDIOC_ENUM_FRAMESIZES: /* decode on exit */ {
struct v4l2_frmsizeenum s;
@ -202,6 +205,7 @@ v4l2_ioctl(struct tcb *tcp, unsigned long code, long arg)
tprints("}");
return 1;
}
#endif /* VIDIOC_ENUM_FRAMESIZES */
case VIDIOC_G_FMT:
case VIDIOC_S_FMT:
@ -450,6 +454,7 @@ v4l2_ioctl(struct tcb *tcp, unsigned long code, long arg)
return 1;
}
#ifdef VIDIOC_ENUM_FRAMEINTERVALS
case VIDIOC_ENUM_FRAMEINTERVALS: {
struct v4l2_frmivalenum f;
@ -480,6 +485,7 @@ v4l2_ioctl(struct tcb *tcp, unsigned long code, long arg)
tprints("}");
return 1;
}
#endif /* VIDIOC_ENUM_FRAMEINTERVALS */
case VIDIOC_CROPCAP: {
struct v4l2_cropcap c;