Hi Olivier,
> what is the frame rate you have with the UVC driver ? I have only about
> 7 fps with either the test program or OpenCV and UVC driver. Can I
> change this ? For example, with pwc, we can switch the fps when loading
> the kernel module.
The frame rate should be selectable using VIDIOC_S_PARM, but that's currently
not implemented. The V4L2 and UVC stream parameters negociation (pixel
format, frame size, frame rate and compression quality) are not entirely
compatible, I'm thus trying to find a way to solve the problem.
Basically, UVC negociates streaming parameters by setting the pixel format and
frame size first, then negociates frame rate and compression quality. V4L2
uses VIDIOC_S_PARM to set the frame rate and compression quality, and
VIDIOC_S_FMT to negociate the format. My problem is that if the user selects
a frame rate/compression quality before negociating the format (which is what
V4L2 currently does), I will have no way to report a failure before format
negociation, at which time compression quality/frame rate values might be
changed by the driver without any notification to the user.
The other issue is that V4L2 reports the maximum buffer size to the user when
VIDIOC_S_FMT/VIDIOC_TRY_FMT are called, and I need the compression quality to
compute the buffer size, so I can't report it there if the compression
quality is changed after pixel format and frame size negociation.
The easiest fix would be to modify V4L2 to negociate compression quality and
frame rate after format negociation, but that would break backward
compatibility, so it's probably not a valid solution.
Laurent Pinchart
|