v4l2 set-ctrls always produce error
I'm using a Logitech C920 camera which VLC reports to have the following controls:
"980900": brightness (Brightness)
"980901": contrast (Contrast)
"980902": saturation (Saturation)
"98090c": auto-white-balance (White Balance Temperature, Auto)
"980913": gain (Gain)
"980918": power-line-frequency (Power Line Frequency)
"98091a": white-balance-temperature (White Balance Temperature)
"98091b": sharpness (Sharpness)
"98091c": backlight-compensation (Backlight Compensation)
"9a0901": exposure__auto (Exposure, Auto)
"9a0902": exposure_(absolute) (Exposure (Absolute))
"9a0903": exposure__auto_priority (Exposure, Auto Priority)
"9a0908": pan_(absolute) (Pan (Absolute))
"9a0909": tilt_(absolute) (Tilt (Absolute))
"9a090a": focus_(absolute) (Focus (absolute))
"9a090c": focus__auto (Focus, Auto)
"9a090d": zoom__absolute (Zoom, Absolute)
"a046d05": led1_mode (LED1 Mode)
"a046d06": led1_frequency (LED1 Frequency)
"ffffffffffffffff": reset (Reset defaults)
I try to set them on the command line:
nuno@sky5:~/Desktop/vlc$ ./vlc v4l2:///dev/video1:set-ctrls={"brightness=0"}
VLC media player 2.2.0-git Weatherwax (revision 2.1.0-git-2738-g9ffe8e9)
[000000000179b3a8] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f69ec000ee8] v4l2 demux error: control "brightness" not available
[00007f69d8001d68] freetype spu text error: Breaking unbreakable line
While a error is reported, the brightness is actually set correctly. In this case the error message is the bug. On the other hand it is not possible to set the controls in some other cases:
Sets the control, but gives error message
vlc v4l2:///dev/video1:set-ctrls={"brightness=0"}
Does not set the control, gives error message
vlc v4l2:///dev/video1:set-ctrls={"980900=0"}
vlc v4l2:///dev/video1:set-ctrls={"focus__auto=0"}
vlc v4l2:///dev/video1:set-ctrls={"9a090c=0"}
Linux sky5 3.13.0-20-generic #42 (closed)-Ubuntu SMP Fri Mar 28 09:56:33 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux The same behaviour is found in linux 3.8 and VLC 2.0.8 and 2.1.2.
Edited by Rémi Denis-Courmont