If not, then it could be that you are missing some v4l2 initialization make sure you follow all the necessary steps (check v4l2 api here: http://linuxtv.org/downloads/v4l-dvb-apis/)
you should also query the controls first to get the hardware supported values,
use VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU for that.
predefined values like V4L2_EXPOSURE_MANUAL may not work as expected or even be available at all, this is the reason why it's important to query the controls first.
It could also be that you camera crashed, this is easy to solve, just unplug and plug back the usb cable :D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to control the webcam exposure using following code(excerpt only) but i get Input/Output error while setting 'value':
am i doing any mistake here?
I am using Logitech Webcam Sphere AF.
Any updates on this issue?
Exposure value can only be set set if exposure mode is set to manual.
Make sure to change this first, by default it will be in auto mode.
Regards,
Paulo
Hi,
I tried setting exposure mode to manual by:
ctrl.id=V4L2_CID_EXPOSURE_AUTO;
ctrl.value=V4L2_EXPOSURE_MANUAL;
but it is giving Error Code-5:Input/Output error.
Do other controls work ?
If not, then it could be that you are missing some v4l2 initialization make sure you follow all the necessary steps (check v4l2 api here: http://linuxtv.org/downloads/v4l-dvb-apis/)
you should also query the controls first to get the hardware supported values,
use VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU for that.
predefined values like V4L2_EXPOSURE_MANUAL may not work as expected or even be available at all, this is the reason why it's important to query the controls first.
It could also be that you camera crashed, this is easy to solve, just unplug and plug back the usb cable :D