diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-02 15:34:34 +0200 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-02 15:34:34 +0200 |
commit | 5999b7d164dbf3118a3a75ee3f6f0b48cb8845c1 (patch) | |
tree | f752c096c3af7126110654d7cebaa9eeb6cf0f74 /v4l2-apps/libv4l/libv4lconvert/processing | |
parent | 2e6d2fb93c7435890fd4789e4c01456f4150ff7e (diff) | |
download | mediapointer-dvb-s2-5999b7d164dbf3118a3a75ee3f6f0b48cb8845c1.tar.gz mediapointer-dvb-s2-5999b7d164dbf3118a3a75ee3f6f0b48cb8845c1.tar.bz2 |
libv4l: initial support for compiling on FreeBSD
From: Hans Petter Selasky <hselasky@freebsd.org>
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
Priority: normal
Signed-off-by: Hans Petter Selasky <hselasky@freebsd.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/processing')
5 files changed, 9 insertions, 15 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/autogain.c b/v4l2-apps/libv4l/libv4lconvert/processing/autogain.c index ed4b8224f..358264c68 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/autogain.c +++ b/v4l2-apps/libv4l/libv4lconvert/processing/autogain.c @@ -20,12 +20,12 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> -#include <syscall.h> #include <unistd.h> #include "libv4lprocessing.h" #include "libv4lprocessing-priv.h" #include "../libv4lconvert-priv.h" /* for PIX_FMT defines */ +#include "../libv4lsyscall-priv.h" static int autogain_active(struct v4lprocessing_data *data) { return v4lcontrol_get_ctrl(data->control, V4LCONTROL_AUTOGAIN); @@ -45,15 +45,15 @@ static int autogain_calculate_lookup_tables( ctrl.id = V4L2_CID_EXPOSURE; expoctrl.id = V4L2_CID_EXPOSURE; - if (syscall(SYS_ioctl, data->fd, VIDIOC_QUERYCTRL, &expoctrl) || - syscall(SYS_ioctl, data->fd, VIDIOC_G_CTRL, &ctrl)) + if (SYS_IOCTL(data->fd, VIDIOC_QUERYCTRL, &expoctrl) || + SYS_IOCTL(data->fd, VIDIOC_G_CTRL, &ctrl)) return 0; exposure = orig_exposure = ctrl.value; ctrl.id = V4L2_CID_GAIN; gainctrl.id = V4L2_CID_GAIN; - if (syscall(SYS_ioctl, data->fd, VIDIOC_QUERYCTRL, &gainctrl) || - syscall(SYS_ioctl, data->fd, VIDIOC_G_CTRL, &ctrl)) + if (SYS_IOCTL(data->fd, VIDIOC_QUERYCTRL, &gainctrl) || + SYS_IOCTL(data->fd, VIDIOC_G_CTRL, &ctrl)) return 0; gain = orig_gain = ctrl.value; @@ -125,12 +125,12 @@ static int autogain_calculate_lookup_tables( if (gain != orig_gain) { ctrl.id = V4L2_CID_GAIN; ctrl.value = gain; - syscall(SYS_ioctl, data->fd, VIDIOC_S_CTRL, &ctrl); + SYS_IOCTL(data->fd, VIDIOC_S_CTRL, &ctrl); } if (exposure != orig_exposure) { ctrl.id = V4L2_CID_EXPOSURE; ctrl.value = exposure; - syscall(SYS_ioctl, data->fd, VIDIOC_S_CTRL, &ctrl); + SYS_IOCTL(data->fd, VIDIOC_S_CTRL, &ctrl); } return 0; diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing-priv.h b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing-priv.h index 008d352ff..b73c73b53 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing-priv.h @@ -22,6 +22,7 @@ #define __LIBV4LPROCESSING_PRIV_H #include "../control/libv4lcontrol.h" +#include "../libv4lsyscall-priv.h" #define V4L2PROCESSING_UPDATE_RATE 10 diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c index f050086e3..cbbcca73c 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c +++ b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c @@ -22,7 +22,6 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> -#include <syscall.h> #include <unistd.h> #include "libv4lprocessing.h" #include "libv4lprocessing-priv.h" diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.h b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.h index f1892a279..69d8865b2 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.h +++ b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.h @@ -21,12 +21,7 @@ #ifndef __LIBV4LPROCESSING_H #define __LIBV4LPROCESSING_H -/* These headers are not needed by us, but by linux/videodev2.h, - which is broken on some systems and doesn't include them itself :( */ -#include <sys/time.h> -#include <linux/types.h> -#include <linux/ioctl.h> -/* end broken header workaround includes */ +#include "../libv4lsyscall-priv.h" #include <linux/videodev2.h> struct v4lprocessing_data; diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/whitebalance.c b/v4l2-apps/libv4l/libv4lconvert/processing/whitebalance.c index f5bfd961c..64d20b3ff 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/whitebalance.c +++ b/v4l2-apps/libv4l/libv4lconvert/processing/whitebalance.c @@ -22,7 +22,6 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> -#include <syscall.h> #include <unistd.h> #include "libv4lprocessing.h" #include "libv4lprocessing-priv.h" |