On 04/27/2010 05:48 AM, Paulo Assis wrote:
Ian
2010/4/27 Ian Latter<[email protected]>:
You can grab frames at whatever speed you want, but it's
the camera
framerate that will make a difference in the usb bandwidth
and not the
amount of frames you get with your application.
So, if you don't take a frame from the UVC driver, it will
simply
continue to refresh an internal buffer with new frames from the
camera device?
Think of it like this, the necessary bandwidth is requested by the
device and it will depend on the compression, resolution and
framerate, in fact I think some ("buggy") devices will always request
the maximum bandwidth causing problems on initialization, for these
devices I think uvcvideo uses it's own algorithm to calc the necessary
bandwidth.
Do the number of URBs have any effect at all? I made an initial attempt
to check this a while back by recompiling the driver with UVC_URBS as 1
or 2 instead of 5. Changed the MAX_ISO_PACKETS a lot smaller too. I
wanted to see if perhaps submitting less URBs would somehow lessen the
bandwidth requirements. It didn't fix the problem though.
I suspect that somewhere in an underlying layer, whether kernel or
physical, something is checking that bandwidth requirement for the
configured endpoints and then denying new URBs being submitted. I'm not
opposed to modifying something at a lower level but I haven't found the
spot at this point. I guess if the error comes from the physical hub
there isn't much to be done then.
Also the device will always try to dispatch frames at the requested
framerate, if you don't grab them they will simply be dropped by the
driver.
I wonder if there is some way to restrict URB submitting to around 10
fps? Perhaps a semaphore on the number of cameras that can be
submitting URBs at all. If I go ahead and configure all the cameras to
run at 15 fps but only submit URBs for say 3 of the cameras at a time it
seems it would work. I'm not worried about dropping 1/3 of the frames.
I don't think I can write them all out to storage fast enough anyway.
(I can come close to keeping up with 10 fps on 8 cameras though.)
-Dennis
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel