On Friday 28 August 2009 01:44:43 Tim Harvey wrote: > Laurent Pinchart wrote: > > On Thursday 13 August 2009 01:32:22 Tim Harvey wrote: > > > I'm looking at using multiple UVC cameras which likely will not support > > > MJPEG. I'm curious how to calculate my max framerate for a given > > > resolution and number of cameras based on a single USB 2.0 bus and thus > > > am trying to understand the calculation and the architecture of UVC and > > > the uvcvideo driver. > > > > > > I recall reading somewhere (perhaps the uvccapture source) the uvcvideo > > > driver (or perhaps UVC itself, or perhaps a limitation of uvccapture) > > > was not able to capture still images from cameras and instead it would > > > put the camera in streaming mode and grab frames as directed. > > > > UVC specifies 3 different methods to support still capture. The most > > simple one (method 1) is to just take the next frame from a video stream. > > There's nothing required on the camera side for this, making it a very > > simple and popular method among camera developers. > > > > Two other methods are also possible. One of them (method 2) involves > > temporarily stopping the video stream, negotiating still image capture > > parameters, get a still image from the camera through the video stream > > and then resuming video streaming. The other (method 3) uses a separate > > bulk endpoint to stream the still image. > > > > I've never seen any camera implementing the last method. Method 2 is > > supported by several webcams, but not by the UVC driver. One main > > obstacle to getting that supported by the driver is the lack of a still > > image capture API in v4l2. > > Great explanation - thanks! > > What would the risks be in using method 1 but turning streaming on/off > on a device that may support a min framerate of 30fps fast enough to > grab say 1fps and thus conserve USB bus bandwidth? Is there a rather > long latency in being able to start/stop streaming from the current UVC > devices?
It really depends on the device. For instance, on the Logitech Quickcam Pro for Notebooks that I use as my primary testing device, turning streaming on the first time after plugging the device in takes a few seconds. > How can I determine what the USB bus utilization is for a specific > device that I'm testing? I'm not quite clear if there is anything in > /proc/bus/usb/devices that can be decrypted to provide this > information. I'm up for hacking in some printk's into usbcore if thats > what it would take. If you apply the following patch just set the module trace parameter to 1024. The driver will print the bandwidth requested by the device (in bytes per microframe) when you start video streaming. http://linuxtv.org/hg/~pinchartl/uvcvideo/rev/4533a406fddb There are 8000 microframes per second for USB high speed devices, and periodic (isochronous+interrupt) transfers are limited to 80% of the overall USB bandwidth. -- Regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
