Hi Frédérick,
On Sunday 17 February 2008, Frédérik Rozon wrote:
> Hi everyone,
>
> I know this has been discused before, but I just can't disable the
> auto exposure feature on my Quickcam pro 5000. I'm coding a computer
> vision program using the latest version of uvc (as of Febuary 16th).
> I'm a newbie user of uvc, and I've look some sample programs, and I'm
> confused about the fact that the IDs of the commands seems to change
> between versions of uvc. So how do I know which one is the correct
> one? Is V4L2_CID_EXPOSURE_AUTO the correct command ID for this
> feature?
That's the right control. I apologise for the control IDs mess. New controls
are being added to V4L2 to prepare for a future inclusion of the UVC driver
in the mainline Linux kernel. I had to break binary compatibility in the
process.
> Here is the code I use for setting a control:
>
> int
> input_set_control (struct vdIn * device, unsigned int control, int val)
> {
>
> int fd, ret;
> struct v4l2_control c;
>
> c.id = control;
> c.value = val;
> ret = ioctl (fd, VIDIOC_S_CTRL, &c);
>
> return ret;
> }
>
> It always returns -1 for V4L2_CID_EXPOSURE_AUTO.
Always use -W -Wall when compiling C code and fix the warnings. fd is used
uninitialised. You must open the device before using it. If the above sample
is an edited version of your code, check errno upon return of the ioctl call.
Best regards,
Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel