summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4l2
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-13 20:02:34 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-13 20:02:34 +0200
commitfa59c01eadd849ed2e5b0cf1406347bf632c80ed (patch)
treea692af6a62ac3e7f1800d59c9bab4ecd29cd2b30 /v4l2-apps/libv4l/libv4l2
parent47b68b12ace2d6414547991a02fda32a4ae748f7 (diff)
downloadmediapointer-dvb-s2-fa59c01eadd849ed2e5b0cf1406347bf632c80ed.tar.gz
mediapointer-dvb-s2-fa59c01eadd849ed2e5b0cf1406347bf632c80ed.tar.bz2
libv4l: add video processing: whitebalance and normalize
From: Hans de Goede <hdegoede@redhat.com> As the version number shows this work is the basis for a beta release of the 0.6.x series, the big change here is the addition of video processing to libv4l currently this only does whitebalance and normalizing (which turns out to be useless for most cams) but the basic framework for doing video processing, and being able to control it through fake v4l2 controls using for example v4l2ucp is there. The initial version of this code was written by 3 of my computer science students: Elmar Kleijn, Sjoerd Piepenbrink and Radjnies Bhansingh. This initial hg commit is a cleaned up and somewhat bug fixed version of their code. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2')
-rw-r--r--v4l2-apps/libv4l/libv4l2/Makefile2
-rw-r--r--v4l2-apps/libv4l/libv4l2/libv4l2.c15
-rw-r--r--v4l2-apps/libv4l/libv4l2/log.c4
3 files changed, 19 insertions, 2 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/Makefile b/v4l2-apps/libv4l/libv4l2/Makefile
index c3af123c8..4356c0975 100644
--- a/v4l2-apps/libv4l/libv4l2/Makefile
+++ b/v4l2-apps/libv4l/libv4l2/Makefile
@@ -3,7 +3,7 @@ override CPPFLAGS += -I../include -I../../../include -fvisibility=hidden
CFLAGS := -g -O1
CFLAGS += -Wall -Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-LIBS_libv4l2 = -lpthread
+LIBS_libv4l2 = -lpthread -lrt
V4L2_OBJS = libv4l2.o log.o
V4L2CONVERT = v4l2convert.so
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c
index b6ddef6e8..91e0193ee 100644
--- a/v4l2-apps/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c
@@ -676,6 +676,9 @@ int v4l2_ioctl (int fd, unsigned long int request, ...)
/* Is this a capture request and do we need to take the stream lock? */
switch (request) {
+ case VIDIOC_QUERYCTRL:
+ case VIDIOC_G_CTRL:
+ case VIDIOC_S_CTRL:
case VIDIOC_QUERYCAP:
is_capture_request = 1;
break;
@@ -739,6 +742,18 @@ int v4l2_ioctl (int fd, unsigned long int request, ...)
&devices[index].src_fmt, &devices[index].dest_fmt);
switch (request) {
+ case VIDIOC_QUERYCTRL:
+ result = v4lconvert_vidioc_queryctrl(devices[index].convert, arg);
+ break;
+
+ case VIDIOC_G_CTRL:
+ result = v4lconvert_vidioc_g_ctrl(devices[index].convert, arg);
+ break;
+
+ case VIDIOC_S_CTRL:
+ result = v4lconvert_vidioc_s_ctrl(devices[index].convert, arg);
+ break;
+
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *cap = arg;
diff --git a/v4l2-apps/libv4l/libv4l2/log.c b/v4l2-apps/libv4l/libv4l2/log.c
index c29086ff4..251b46ecf 100644
--- a/v4l2-apps/libv4l/libv4l2/log.c
+++ b/v4l2-apps/libv4l/libv4l2/log.c
@@ -1,5 +1,7 @@
/*
-# (C) 2008 Hans de Goede <j.w.r.degoede@hhs.nl>
+# (C) 2008 Elmar Kleijn <elmar_kleijn@hotmail.com>
+# (C) 2008 Sjoerd Piepenbrink <need4weed@gmail.com>
+# (C) 2008 Hans de Goede <hdegoede@redhat.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by