On 04/26/2010 02:43 PM, Dennis Muhlestein wrote:
I have a project I've been playing with that uses a number of cameras to construct video from 360 degrees. All cameras can be configured as long as I don't overload the underlying ISO bandwidth limits. ("No space left on device." has been discussed a few times on this list.)The application works well, but I'd like to experiment with making the video quality better. There is always some sheering when the cameras are moving but the higher framerate I can capture at, the less the sheering effect will degrade the video quality. Can anyone suggest a way to configure the cameras at a higher framerate without overloading the USB bus? Suppose I can read at 10 fps right now without overloading the USB bus. I'd like to set the framerate to 15, but still just capture around 10.
One idea I've been toying with is to add a semaphore around submitting the URBs.
In uvc_video.c, where the URBs are submitted, I'd acquire a semephore for each device currently submitting URBs. The semaphore would limit the number of devices to whatever number I decide can safely submit URBs simultaneously on the bus without throwing out of space errors.
I did an initial test of this and it looks promising. I can configure all the cameras. As long as I don't submit the URBs for the number of devices beyond that which will work at the same time, the other cameras simply drop the data.
I'm not sure the best places to control the locking and unlocking of the semaphore are. Right now, I lock it before submitting URBs in uvc_init_video. In uvc_video_complete, I unlock it and relock it if the buffer is complete (allowing another camera to acquire it and capture a frame).
Anyway, it isn't working perfectly yet but I think I can debug it and at least get to a point where I know if it's worth pursuing. I'm curious if anyone can provide thoughts or alternatives.
Thanks Dennis _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
