Just a little update for those still reading this thread. I've just sent a set of patches to be merged, including some of the features/fixes requested. Some could do with a little more testing, but it seemed an opportune time to get them out there.
- Add manual shutter speed control ("v4l2-ctl --set_ctrl=auto_exposure=1" for manual control, and then "v4l2-ctl --set_ctrl=exposure_time_absolute=<value desired in 100usecs>") , and correct EV values (V4L2 wants 1/1000ths and we weren't advertising this).
- Correct JPEG Q-factor range to 1-100, not 0-100.
- Fix the driver lockup if start_streaming failed. This was the reason that all set-fmt-video calls would then fail.
- Fix ISO controls. These were asking for incorrect values from the GPU.
- Support flicker avoidance - "v4l2-ctl --set_ctrl=power_line_frequency=[0-3]" for [off|50Hz|60Hz|auto].
- Add frame rate control - "v4l2-ctl --set-parm=<fps>"
- A couple of fixes to come closer to passing the conformance tests (I think it is one failure now).
- Support inline H264 headers as requested by towolf. This needs a GPU firmware update (about to be released) to work cleanly, but works anyway if you set the pixelformat as H264 before enabling it. "v4l2-ctl --set-ctrl=repeat_sequence_header=1"
- Add timestamping to JPEGs. This isn't as accurate as for other frames, but JPEG capture generally doesn't need that accuracy. I'll look at fixing the GPU firmware at some point.
- Fix an issue when reducing the JPEG capture resolution. This was what was initially tripping up Motion when generating JPEGs. Having fixed that I appear to be seeing something else weird with Motion and JPEG where it seg faults when decoding the JPEG. Something strange appears to be happening as the JPEG buffers produced are much smaller than I'd expect (they'll still have full EXIF and a thumbnail in there), and it may explain why it seg faults if the JPEG is corrupt. Starting the overlay before running motion produces more sensibly sized buffers, but I've broken my image and get illegal instructions in weird places now
These will hopefully be released in the next day or so (when popcornmix gets a chance). Sorry it's taken so long, but the day job takes precedence.