openbsd-ports/graphics/luvcview/patches/patch-v4l2uvc_c
jakemsr fb2361ef73 * no more anonymous unions in video(4)
* REVISION, new style WANTLIB/LIB_DEPENDS
2010-09-12 22:31:05 +00:00

74 lines
3.6 KiB
Plaintext

$OpenBSD: patch-v4l2uvc_c,v 1.1 2010/09/12 22:31:05 jakemsr Exp $
--- v4l2uvc.c.orig Thu Aug 26 15:54:18 2010
+++ v4l2uvc.c Thu Aug 26 15:54:54 2010
@@ -833,9 +833,9 @@ int v4L2UpDownPanTilt(struct vdIn *vd, short inc_p, sh
control_s_array.controls = control_s;
control_s[0].id = p_control;
- control_s[0].value = inc_p;
+ control_s[0].un.value = inc_p;
control_s[1].id = t_control;
- control_s[1].value = inc_t;
+ control_s[1].un.value = inc_t;
if ((err = ioctl(vd->fd, VIDIOC_S_EXT_CTRLS, &control_s_array)) < 0) {
printf("ioctl pan-tilt updown control error\n");
@@ -930,18 +930,18 @@ int enum_frame_intervals(int dev, __u32 pixfmt, __u32
while ((ret = ioctl(dev, VIDIOC_ENUM_FRAMEINTERVALS, &fival)) == 0) {
if (fival.type == V4L2_FRMIVAL_TYPE_DISCRETE) {
printf("%u/%u, ",
- fival.discrete.numerator, fival.discrete.denominator);
+ fival.un.discrete.numerator, fival.un.discrete.denominator);
} else if (fival.type == V4L2_FRMIVAL_TYPE_CONTINUOUS) {
printf("{min { %u/%u } .. max { %u/%u } }, ",
- fival.stepwise.min.numerator, fival.stepwise.min.numerator,
- fival.stepwise.max.denominator, fival.stepwise.max.denominator);
+ fival.un.stepwise.min.numerator, fival.un.stepwise.min.numerator,
+ fival.un.stepwise.max.denominator, fival.un.stepwise.max.denominator);
break;
} else if (fival.type == V4L2_FRMIVAL_TYPE_STEPWISE) {
printf("{min { %u/%u } .. max { %u/%u } / "
"stepsize { %u/%u } }, ",
- fival.stepwise.min.numerator, fival.stepwise.min.denominator,
- fival.stepwise.max.numerator, fival.stepwise.max.denominator,
- fival.stepwise.step.numerator, fival.stepwise.step.denominator);
+ fival.un.stepwise.min.numerator, fival.un.stepwise.min.denominator,
+ fival.un.stepwise.max.numerator, fival.un.stepwise.max.denominator,
+ fival.un.stepwise.step.numerator, fival.un.stepwise.step.denominator);
break;
}
fival.index++;
@@ -965,25 +965,25 @@ int enum_frame_sizes(int dev, __u32 pixfmt)
while ((ret = ioctl(dev, VIDIOC_ENUM_FRAMESIZES, &fsize)) == 0) {
if (fsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) {
printf("{ discrete: width = %u, height = %u }\n",
- fsize.discrete.width, fsize.discrete.height);
+ fsize.un.discrete.width, fsize.un.discrete.height);
ret = enum_frame_intervals(dev, pixfmt,
- fsize.discrete.width, fsize.discrete.height);
+ fsize.un.discrete.width, fsize.un.discrete.height);
if (ret != 0)
printf(" Unable to enumerate frame sizes.\n");
} else if (fsize.type == V4L2_FRMSIZE_TYPE_CONTINUOUS) {
printf("{ continuous: min { width = %u, height = %u } .. "
"max { width = %u, height = %u } }\n",
- fsize.stepwise.min_width, fsize.stepwise.min_height,
- fsize.stepwise.max_width, fsize.stepwise.max_height);
+ fsize.un.stepwise.min_width, fsize.un.stepwise.min_height,
+ fsize.un.stepwise.max_width, fsize.un.stepwise.max_height);
printf(" Refusing to enumerate frame intervals.\n");
break;
} else if (fsize.type == V4L2_FRMSIZE_TYPE_STEPWISE) {
printf("{ stepwise: min { width = %u, height = %u } .. "
"max { width = %u, height = %u } / "
"stepsize { width = %u, height = %u } }\n",
- fsize.stepwise.min_width, fsize.stepwise.min_height,
- fsize.stepwise.max_width, fsize.stepwise.max_height,
- fsize.stepwise.step_width, fsize.stepwise.step_height);
+ fsize.un.stepwise.min_width, fsize.un.stepwise.min_height,
+ fsize.un.stepwise.max_width, fsize.un.stepwise.max_height,
+ fsize.un.stepwise.step_width, fsize.un.stepwise.step_height);
printf(" Refusing to enumerate frame intervals.\n");
break;
}