Hi,

I've some patches to bring webcam support in kopete (kde4 version).

I'm using them for quite some time now and webcam chat works fine with
another yahoo client over the internet (I haven't test with other IM
protocol)

patches attached or available here :
http://membres.multimania.fr/mike8/bsd/

review and comments are welcome

please Cc: me, I'm not subscribed to this list.

WBR,
Mikaƫl

--- Makefile.orig	2010-09-26 14:42:43.000000000 +0200
+++ Makefile	2010-09-26 14:59:28.000000000 +0200
@@ -60,6 +60,12 @@
 
 .include <bsd.port.options.mk>
 
+post-patch:
+	@${REINPLACE_CMD} -e 's#defined(__linux__)#(defined(__linux__) || defined(__FreeBSD__))#g' \
+	    ${WRKSRC}/kopete/libkopete/avdevice/videodevice.cpp
+	@${REINPLACE_CMD} -e 's#defined(__linux__)#(defined(__linux__) || defined(__FreeBSD__))#g' \
+	    ${WRKSRC}/kopete/libkopete/avdevice/videodevicepool.cpp
+
 .if ${OSVERSION} >= 800074
 CMAKE_ARGS+=	-DBUILD_kppp:BOOL=OFF
 PLIST_SUB+=	KPPP="@comment "
--- ./kopete/libkopete/avdevice/videodevice.h.orig	2010-09-26 13:20:47.549551269 +0200
+++ ./kopete/libkopete/avdevice/videodevice.h	2010-09-26 13:24:23.403546399 +0200
@@ -32,9 +32,11 @@
 #include <unistd.h>
 #include <signal.h>
 
-#if defined(__linux__) && defined(ENABLE_AV)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
 
+#if defined(__linux__)
 #include <asm/types.h>
+#endif
 #undef __STRICT_ANSI__
 #ifndef __u64 //required by videodev.h
 #define __u64 unsigned long long
@@ -48,8 +50,10 @@
 #define pgoff_t unsigned long
 #endif
 
+#if defined(__linux__)
 #include <linux/fs.h>
 #include <linux/kernel.h>
+#endif
 #include <linux/videodev.h>
 #define VIDEO_MODE_PAL_Nc  3
 #define VIDEO_MODE_PAL_M   4
@@ -61,7 +65,7 @@
 #include <libv4l2.h>
 #endif // HAVE_V4L2
 
-#endif // __linux__
+#endif // __linux__ __FreeBSD__ ENABLE_AV
 
 #include <qstring.h>
 #include <qfile.h>
@@ -80,7 +84,7 @@
 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
@@ -327,7 +331,7 @@
 	QVector<Kopete::AV::VideoInput> m_input;
 
 protected:
-#if defined(__linux__) && defined(ENABLE_AV)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
 	/*!
 	    \enum VideoDevice::imgctrl_id Control-IDs used for V4L1- and software-controls
 	 */
@@ -356,7 +360,7 @@
 	int descriptor;
 	videodev_driver m_driver;
 	QString m_model;
-#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_format fmt;
@@ -388,7 +392,7 @@
 	virtual int initDevice();
 
 	void setupControls();
-#if defined(__linux__) && defined(ENABLE_AV) && defined(V4L2_CAP_VIDEO_CAPTURE)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV) && defined(V4L2_CAP_VIDEO_CAPTURE)
 	bool getMenuCtrlOptions(quint32 id, quint32 maxindex, QStringList * options);
 	void saveV4L2ControlData(struct v4l2_queryctrl qctrl);
 	const char *getUnifiedV4L2StdCtrlName(quint32 std_ctrl_id);
_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information

Reply via email to