libv4l: Don't add "fake" controls when not doing conversion
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>
Wed, 15 Apr 2009 12:03:32 +0000 (14:03 +0200)
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>
Wed, 15 Apr 2009 12:03:32 +0000 (14:03 +0200)
From: Hans de Goede <hdegoede@redhat.com>

Since all things fake controls enable (such as whitebalancing) depend upon
libv4lconvert_convert being called, do not fake controls when conversion
is disabled.

Priority: normal

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
lib/libv4l2/libv4l2.c

index 8d01b03..fc5e63e 100644 (file)
@@ -687,6 +687,9 @@ int v4l2_ioctl (int fd, unsigned long int request, ...)
     case VIDIOC_QUERYCTRL:
     case VIDIOC_G_CTRL:
     case VIDIOC_S_CTRL:
+      if (!(devices[index].flags & V4L2_DISABLE_CONVERSION))
+       is_capture_request = 1;
+      break;
     case VIDIOC_QUERYCAP:
       is_capture_request = 1;
       break;