summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/avdevice/videodevice.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:08:12 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:27:08 +0200
commit74f46ee8bdc32c7cd65c17addea3117c3047e7c0 (patch)
treefdb03ae6d11fb5ed7803492da0e7ba1a2e4bf415 /kopete/libkopete/avdevice/videodevice.h
parentec6378cdd8ea847ecdd81f8976b5adf2551cef56 (diff)
downloadtdenetwork-74f46ee8bdc32c7cd65c17addea3117c3047e7c0.tar.gz
tdenetwork-74f46ee8bdc32c7cd65c17addea3117c3047e7c0.zip
Add webcam support in kopete on freebsd
[taken from FreeBSD kopete patches] Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
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;