I thought that is a good place to implement it, so I
added two new options in qcset.c:
-s r Settings read (from STDIN)
-s w Settings write (to STDOUT)
I am not sure about the last line added (argv += c;),
but seems to work.
So you can do:
qcset /dev/v4l/video0 -s w >settings.dump
(experiment something, say qcset /dev/v4l/video0 -b 3456)
qcset /dev/v4l/video0 -s r <settings.dump
Of course, works if you have enabled keepsettings when
loading the module (modprobe quickcam keepsettings=1).
Code is a bit dirty, but an idea that works.
qcset-settings.patch
Logged In: NO
Nice patch, I'll apply it after some more error checking (I'm
paranoid). Even better would
be if you could save & restore the other settings
too like "quality=xxx", etc...
On the other hand now it works with all devices
not just QuickCams.
argv += c is just all right; c is zero if you write
option and argument together like "-sw".
I should switch to using getopt() sometime...
maybe.