diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-26 19:50:53 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-26 19:50:53 +0000 |
commit | 76a162edfcde88508260cd51c5215fa850ba085e (patch) | |
tree | 01fad4ab15f77f7a2acdcfbf2c5440f562fa46e9 /sys | |
parent | f036d809c4df98804cafaccf1fbafa35b8ed114d (diff) |
oops. the frame rate is the inverse of the frame interval. fixes
setting the frame rate with luvcview.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 2193a0d4bfb..216cdcc5352 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.157 2011/03/26 08:24:52 jakemsr Exp $ */ +/* $OpenBSD: uvideo.c,v 1.158 2011/03/26 19:50:52 jakemsr Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -2976,10 +2976,13 @@ uvideo_s_parm(void *v, struct v4l2_streamparm *parm) parm->parm.capture.timeperframe.denominator == 0) return (EINVAL); - /* only whole number frame rates for now */ + /* + * XXX Only whole number frame rates for now. Frame + * rate is the inverse of time per frame. + */ sc->sc_frame_rate = - parm->parm.capture.timeperframe.numerator / - parm->parm.capture.timeperframe.denominator; + parm->parm.capture.timeperframe.denominator / + parm->parm.capture.timeperframe.numerator; } else return (EINVAL); |