Menu

#7 Add simple read/write settings to qcset

open
None
5
2006-05-02
2005-03-30
No

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.

Discussion

  • Kalin KOZHUHAROV

    qcset-settings.patch

     
  • Nobody/Anonymous

    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.

     
  • Kurt Wall

    Kurt Wall - 2006-05-02
    • assigned_to: nobody --> krwall
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.