Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jun 2011 11:50:13 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Boris Samorodov <bsam@ipt.ru>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: Pre-release of webcamd [v0.2.4]
Message-ID:  <201106011150.13316.hselasky@c2i.net>
In-Reply-To: <45215846@bb.ipt.ru>
References:  <201105240020.49377.hselasky@c2i.net> <201105311932.38205.hselasky@c2i.net> <45215846@bb.ipt.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 01 June 2011 11:41:13 Boris Samorodov wrote:
> Running:
> -----
> % pwcview
> Webcam set to: 320x240 (sif) at 5 fps    # OK (shaky, but it's 5 fps)
> % pwcview -f 30
> Webcam set to: 320x240 (sif) at 30 fps   # shaky video, (5 fps?)
> % pwcview -s vga
> Webcam set to: 640x480 (vga) at 5 fps    # seems to use 30 fps
> % pwcview -s vga -f 5
> Webcam set to: 640x480 (vga) at 5 fps    # seems to use 30 fps
> -----
> 
> Thanks!

Hi,

The shakyness I think can be fixed by increasing the buffer size used by UVC 
video driver, it is currently very small, only 2*7ms:

Index: patches/uvcvideo.h.diff
===================================================================
--- patches/uvcvideo.h.diff     (revision 1788)
+++ patches/uvcvideo.h.diff     (working copy)
@@ -8,7 +8,7 @@
 +#define UVC_URBS              2
  /* Maximum number of packets per URB. */
 -#define UVC_MAX_PACKETS               32
-+#define UVC_MAX_PACKETS               56
++#define UVC_MAX_PACKETS               (8*16) /* ms/8 for HighSpeed */
  /* Maximum number of video buffers. */
  #define UVC_MAX_VIDEO_BUFFERS 32
  /* Maximum status buffer size in bytes of interrupt URB. */

This value should be dynamic depending on various factors like device speed 
and endpoint configuration. I have found any time yet to make the change.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106011150.13316.hselasky>