summaryrefslogtreecommitdiff
path: root/app/video
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-13 01:35:51 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-13 01:35:51 +0000
commit2c13224b044f8d6d9c9bba4f4941bc6ea8990975 (patch)
tree59a74694e9be520edf7f847ff7e02d326e7427f0 /app/video
parent720bd2dadb437aa8240cad5b1752a3daa963ff9d (diff)
no more anonymous unions in video(4)
Diffstat (limited to 'app/video')
-rw-r--r--app/video/video.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/app/video/video.c b/app/video/video.c
index a0f6ce93b..b2ab754e9 100644
--- a/app/video/video.c
+++ b/app/video/video.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: video.c,v 1.4 2010/07/26 23:02:06 jakemsr Exp $ */
+/* $OpenBSD: video.c,v 1.5 2010/09/13 01:35:50 jakemsr Exp $ */
/*
* Copyright (c) 2010 Jacob Meuser <jakemsr@openbsd.org>
*
@@ -710,19 +710,19 @@ dev_get_sizes(struct video *vid)
while (ioctl(d->fd, VIDIOC_ENUM_FRAMESIZES, &fsize) == 0) {
switch (fsize.type) {
case V4L2_FRMSIZE_TYPE_DISCRETE:
- sizes[nsizes].w = fsize.discrete.width;
- sizes[nsizes].h = fsize.discrete.height;
+ sizes[nsizes].w = fsize.un.discrete.width;
+ sizes[nsizes].h = fsize.un.discrete.height;
nsizes++;
break;
case V4L2_FRMSIZE_TYPE_CONTINUOUS:
- step_w = (((fsize.stepwise.max_width -
- fsize.stepwise.min_width) / MAX_DSZS) + 15) & ~15;
- step_h = (((fsize.stepwise.max_height -
- fsize.stepwise.min_height) / MAX_DSZS) + 15) & ~15;
- for (tmp_w = fsize.stepwise.min_width,
- tmp_h = fsize.stepwise.min_height;
- tmp_w <= fsize.stepwise.max_width &&
- tmp_h <= fsize.stepwise.max_height;
+ step_w = (((fsize.un.stepwise.max_width -
+ fsize.un.stepwise.min_width) / MAX_DSZS) + 15) & ~15;
+ step_h = (((fsize.un.stepwise.max_height -
+ fsize.un.stepwise.min_height) / MAX_DSZS) + 15) & ~15;
+ for (tmp_w = fsize.un.stepwise.min_width,
+ tmp_h = fsize.un.stepwise.min_height;
+ tmp_w <= fsize.un.stepwise.max_width &&
+ tmp_h <= fsize.un.stepwise.max_height;
tmp_w += step_w, tmp_h += step_h) {
sizes[nsizes].w = tmp_w;
sizes[nsizes].h = tmp_h;
@@ -731,18 +731,18 @@ dev_get_sizes(struct video *vid)
}
break;
case V4L2_FRMSIZE_TYPE_STEPWISE:
- step_w = (((fsize.stepwise.max_width -
- fsize.stepwise.min_width) / MAX_DSZS) +
- fsize.stepwise.step_width - 1) &
- ~(fsize.stepwise.step_width - 1);
- step_h = (((fsize.stepwise.max_height -
- fsize.stepwise.min_height) / MAX_DSZS) +
- fsize.stepwise.step_height - 1) &
- ~(fsize.stepwise.step_height - 1);
- for (tmp_w = fsize.stepwise.min_width,
- tmp_h = fsize.stepwise.min_height;
- tmp_w <= fsize.stepwise.max_width &&
- tmp_h <= fsize.stepwise.max_height;
+ step_w = (((fsize.un.stepwise.max_width -
+ fsize.un.stepwise.min_width) / MAX_DSZS) +
+ fsize.un.stepwise.step_width - 1) &
+ ~(fsize.un.stepwise.step_width - 1);
+ step_h = (((fsize.un.stepwise.max_height -
+ fsize.un.stepwise.min_height) / MAX_DSZS) +
+ fsize.un.stepwise.step_height - 1) &
+ ~(fsize.un.stepwise.step_height - 1);
+ for (tmp_w = fsize.un.stepwise.min_width,
+ tmp_h = fsize.un.stepwise.min_height;
+ tmp_w <= fsize.un.stepwise.max_width &&
+ tmp_h <= fsize.un.stepwise.max_height;
tmp_w += step_w, tmp_h += step_h) {
sizes[nsizes].w = tmp_w;
sizes[nsizes].h = tmp_h;