When choosing a palette I had the problem that the selected palette wasn't chosen, but instead a 'higher' supported palette. My camera supports
V4L2 _PIX_FMT_MJPEG (2) and
V4L2 _PIX_FMT_YUYV (6). Even when selecting MJPEG in the config, the actual used palette is the 'higher' YUYV. I'm not sure, but it seems an oversight in the code to me. It's also possible that this is intended behaviour of course.
See attachments.
The break statement in the for loop breaks from the for and not from the while. In my case I set 2 and although that is selected, the final chosen palette is 6, because that is also supported and higher. In other words; the search for supported palettes goes on even though the requested palette is already found and set. The attached new code (if on line 45) seems to remedy this behaviour.
-----
*
video2.c: Trunk rev306 code
*
video2_new.c: Proposed new code
Thanks , commited to trunk and 3.2.10 branch
--
AngelCarpintero - 27 Jan 2008