summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-05-25 15:25:15 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-05-25 15:25:15 +0200
commit51949cfaadebd8e341fed1e85eca683dd40195d2 (patch)
treea073bed97a4704eb6f73c2c0e54399f30f35e93d /v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
parentb152107391374bfc61ea21d1731fd349352bedf2 (diff)
downloadmediapointer-dvb-s2-51949cfaadebd8e341fed1e85eca683dd40195d2.tar.gz
mediapointer-dvb-s2-51949cfaadebd8e341fed1e85eca683dd40195d2.tar.bz2
libv4l: add software autogain / exposure
From: Hans de Goede <hdegoede@redhat.com> Add software autogain / exposure, for camera's which have gain and exposure controls but do not contain the ability to calculate the average lumination in hardware (which is needed to do this in the kernel). This patch enables this for the spca561 rev12a, but it should be usefull for other cameras too. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
index afb0c854c..58d77e5ef 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
@@ -127,6 +127,9 @@ struct v4lconvert_data *v4lconvert_create(int fd)
data->flags |= V4LCONVERT_IS_UVC;
else if (!strcmp((char *)cap.driver, "sn9c20x"))
data->flags |= V4LCONVERT_IS_SN9C20X;
+
+ if ((cap.capabilities & 0xff) & ~V4L2_CAP_VIDEO_CAPTURE)
+ always_needs_conversion = 0;
}
data->control = v4lcontrol_create(fd, always_needs_conversion);
@@ -136,7 +139,7 @@ struct v4lconvert_data *v4lconvert_create(int fd)
}
data->control_flags = v4lcontrol_get_flags(data->control);
- data->processing = v4lprocessing_create(data->control);
+ data->processing = v4lprocessing_create(fd, data->control);
if (!data->processing) {
v4lcontrol_destroy(data->control);
free(data);