summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/avdevice/videodevice.h
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2015-06-26 13:08:12 +0200
committerSlávek Banko <[email protected]>2015-06-26 13:31:06 +0200
commitbbf336489ccb7dc0c08af795fb0ba223a8692db5 (patch)
tree9971ae562586f455b36bba4ccc3ed6ef6769b5a0 /kopete/libkopete/avdevice/videodevice.h
parentbe43d04f2c9edfa7026d3c5f6ea5d121cffdc312 (diff)
downloadtdenetwork-bbf336489ccb7dc0c08af795fb0ba223a8692db5.tar.gz
tdenetwork-bbf336489ccb7dc0c08af795fb0ba223a8692db5.zip
Add webcam support in kopete on freebsd
[taken from FreeBSD kopete patches] Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 74f46ee8bdc32c7cd65c17addea3117c3047e7c0)
Diffstat (limited to 'kopete/libkopete/avdevice/videodevice.h')
-rw-r--r--kopete/libkopete/avdevice/videodevice.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/kopete/libkopete/avdevice/videodevice.h b/kopete/libkopete/avdevice/videodevice.h
index 61bd8844..dd9047c9 100644
--- a/kopete/libkopete/avdevice/videodevice.h
+++ b/kopete/libkopete/avdevice/videodevice.h
@@ -33,9 +33,14 @@
#include <unistd.h>
#include <signal.h>
-#if defined(__linux__) && defined(ENABLE_AV)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
+#if defined HAVE_LINUX_VIDEODEV_H
+#include <linux/videodev.h>
+#endif
+#if defined(__linux__)
#include <asm/types.h>
+#endif
#undef __STRICT_ANSI__
#ifndef __u64 //required by videodev.h
#define __u64 unsigned long long
@@ -50,8 +55,10 @@
#define pgoff_t unsigned long
#endif
+#if defined(__linux__)
#include <linux/fs.h>
#include <linux/kernel.h>
+#endif
#if defined(HAVE_LIBV4L1_VIDEODEV_H)
#include <libv4l1-videodev.h>
#elif defined(HAVE_LINUX_VIDEODEV_H)
@@ -86,7 +93,7 @@ namespace AV {
typedef enum
{
VIDEODEV_DRIVER_NONE
-#if defined( __linux__) && defined(ENABLE_AV)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
,
VIDEODEV_DRIVER_V4L
#ifdef V4L2_CAP_VIDEO_CAPTURE
@@ -282,7 +289,7 @@ public:
int descriptor;
//protected:
-#if defined(__linux__) && defined(ENABLE_AV)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
#ifdef V4L2_CAP_VIDEO_CAPTURE
struct v4l2_capability V4L2_capabilities;
struct v4l2_cropcap cropcap;