From 76a162edfcde88508260cd51c5215fa850ba085e Mon Sep 17 00:00:00 2001 From: Jacob Meuser Date: Sat, 26 Mar 2011 19:50:53 +0000 Subject: oops. the frame rate is the inverse of the frame interval. fixes setting the frame rate with luvcview. --- sys/dev/usb/uvideo.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys/dev/usb') 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 @@ -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); -- cgit v1.2.3