You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.6 KiB
54 lines
1.6 KiB
ndex: cvconfig.h.cmake
|
|
===================================================================
|
|
--- cvconfig.h.cmake (révision 5098)
|
|
+++ cvconfig.h.cmake (révision 5099)
|
|
@@ -19,6 +19,9 @@
|
|
/* V4L2 capturing support */
|
|
#cmakedefine HAVE_CAMV4L2
|
|
|
|
+/* V4L/V4L2 capturing support via libv4l */
|
|
+#cmakedefine HAVE_LIBV4L
|
|
+
|
|
/* Carbon windowing environment */
|
|
#cmakedefine HAVE_CARBON
|
|
|
|
Index: modules/highgui/src/cap.cpp
|
|
===================================================================
|
|
--- modules/highgui/src/cap.cpp (révision 5098)
|
|
+++ modules/highgui/src/cap.cpp (révision 5099)
|
|
@@ -173,7 +173,7 @@
|
|
if (capture)
|
|
return capture;
|
|
#endif
|
|
- #if defined (HAVE_CAMV4L) || defined (HAVE_CAMV4L2)
|
|
+ #if defined HAVE_LIBV4L || (defined (HAVE_CAMV4L) && defined (HAVE_CAMV4L2))
|
|
capture = cvCreateCameraCapture_V4L (index);
|
|
if (capture)
|
|
return capture;
|
|
Index: modules/highgui/src/cap_libv4l.cpp
|
|
===================================================================
|
|
--- modules/highgui/src/cap_libv4l.cpp (révision 5098)
|
|
+++ modules/highgui/src/cap_libv4l.cpp (révision 5099)
|
|
@@ -224,7 +224,7 @@
|
|
#include "highgui.h"
|
|
#include "precomp.hpp"
|
|
|
|
-#if !defined WIN32 && (defined HAVE_CAMV4L || defined HAVE_CAMV4L2)
|
|
+#if !defined WIN32 && defined HAVE_LIBV4L
|
|
|
|
#define CLEAR(x) memset (&(x), 0, sizeof (x))
|
|
|
|
@@ -241,8 +241,12 @@
|
|
#include <sys/stat.h>
|
|
#include <sys/ioctl.h>
|
|
|
|
+#ifdef HAVE_CAMV4L
|
|
#include <linux/videodev.h>
|
|
+#endif
|
|
+#ifdef HAVE_CAMV4L2
|
|
#include <linux/videodev2.h>
|
|
+#endif
|
|
|
|
#include <libv4l1.h>
|
|
#include <libv4l2.h>
|