Range values for V4L2_CID_* commands
Hello, how do I obtain the accepted range of values for each V4L2_CID command? Take V4L2_CID_BRIGHTNESS as an example, how do I know what is the maximum and minimum values accepted for it? I have tried to use 'v4l2_ioctl(fd, VIDIOC_G_CTRL, &query);' thinking that would be stored in the maximum and minimum members for the struct v4l2_queryctrl but that does not appear to be the case as the values for those members are always zero.
Thank you.
Quoted 7 lines · Lucas
Hello, how do I obtain the accepted range of values for each
V4L2_CIDcommand? TakeV4L2_CID_BRIGHTNESSas an example, how do I know what is the maximum and minimum values accepted for it? I have tried to use 'v4l2_ioctl(fd, VIDIOC_G_CTRL, &query);' thinking that would be stored in the maximum and minimum members for the structv4l2_queryctrlbut that does not appear to be the case as the values for those members are always zero.
Use VIDIOC_QUERYCTRL for that. See:
https://linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/vidioc-queryctrl.html
Regards,
Hans
Thank you kind sir.
Quoted 15 lines · Hans Verkuil
Quoted 7 lines · Lucas
Hello, how do I obtain the accepted range of values for each
V4L2_CIDcommand? TakeV4L2_CID_BRIGHTNESSas an example, how do I know what is the maximum and minimum values accepted for it? I have tried to use 'v4l2_ioctl(fd, VIDIOC_G_CTRL, &query);' thinking that would be stored in the maximum and minimum members for the structv4l2_queryctrlbut that does not appear to be the case as the values for those members are always zero.Use
VIDIOC_QUERYCTRLfor that. See:https://linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/vidioc-queryctrl.html
Regards,
Hans