diff options
-rw-r--r-- | v4l2-apps/libv4l/ChangeLog | 9 | ||||
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/v4l2-apps/libv4l/ChangeLog b/v4l2-apps/libv4l/ChangeLog index 08b221c2a..3d0733a2d 100644 --- a/v4l2-apps/libv4l/ChangeLog +++ b/v4l2-apps/libv4l/ChangeLog @@ -1,11 +1,16 @@ +libv4l-0.6.0 +------------ +* Recognize disabled controls and replace with fake equivalents where + available + libv4l-0.5.99 ----------- +------------- * Link libv4lconvert with -lm for powf by Gregor Jasny * Fix black screen on devices with hardware gamma control * Fix crash with devices on which we do not emulate fake controls * Add a patch by Hans Petter Selasky <hselasky@freebsd.org>, which should lead to allowing use of libv4l (and the Linux webcam drivers ported - to userspace usb drivers) on FreeBSd, this is a work in progress + to userspace usb drivers) on FreeBSD, this is a work in progress libv4l-0.5.98 ------------- diff --git a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c index 2f459c396..b50b686df 100644 --- a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c +++ b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c @@ -203,7 +203,7 @@ static void v4lcontrol_init_flags(struct v4lcontrol_data *data) struct v4lcontrol_data *v4lcontrol_create(int fd, int always_needs_conversion) { int shm_fd; - int i, init = 0; + int i, rc, init = 0; char *s, shm_name[256]; struct v4l2_capability cap; struct v4l2_queryctrl ctrl; @@ -230,7 +230,8 @@ struct v4lcontrol_data *v4lcontrol_create(int fd, int always_needs_conversion) if (always_needs_conversion || v4lcontrol_needs_conversion(data)) { for (i = 0; i < V4LCONTROL_AUTO_ENABLE_COUNT; i++) { ctrl.id = fake_controls[i].id; - if (SYS_IOCTL(data->fd, VIDIOC_QUERYCTRL, &ctrl) == -1) + rc = SYS_IOCTL(data->fd, VIDIOC_QUERYCTRL, &ctrl); + if (rc == -1 || (rc == 0 && (ctrl.flags & V4L2_CTRL_FLAG_DISABLED))) data->controls |= 1 << i; } } |