Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
c78cb219
Commit
c78cb219
authored
Jan 29, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Jan 29, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #346 from taka-no-me:decouple_V4L2
parents
ab8d92e1
287fb2c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
6 deletions
+18
-6
CMakeLists.txt
CMakeLists.txt
+4
-2
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+2
-1
cvconfig.h.cmake
cmake/templates/cvconfig.h.cmake
+3
-0
CMakeLists.txt
modules/highgui/CMakeLists.txt
+1
-1
cap.cpp
modules/highgui/src/cap.cpp
+4
-2
cap_libv4l.cpp
modules/highgui/src/cap_libv4l.cpp
+4
-0
cap_v4l.cpp
modules/highgui/src/cap_v4l.cpp
+0
-0
No files found.
CMakeLists.txt
View file @
c78cb219
...
...
@@ -137,7 +137,7 @@ OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF
OCV_OPTION
(
WITH_CSTRIPES
"Include C= support"
OFF IF WIN32
)
OCV_OPTION
(
WITH_TIFF
"Include TIFF support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_UNICAP
"Include Unicap support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_V4L
"Include Video 4 Linux support"
ON
IF
(
UNIX AND NOT A
PPLE AND NOT A
NDROID
)
)
OCV_OPTION
(
WITH_V4L
"Include Video 4 Linux support"
ON
IF
(
UNIX AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_VIDEOINPUT
"Build HighGUI with DirectShow support"
ON IF WIN32
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF
IF
(
NOT ANDROID AND NOT APPLE
)
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
...
...
@@ -725,11 +725,13 @@ if(DEFINED WITH_V4L)
endif
()
if
(
HAVE_CAMV4L2
)
set
(
HAVE_CAMV4L2_STR
"YES"
)
elseif
(
HAVE_VIDEOIO
)
set
(
HAVE_CAMV4L2_STR
"YES(videoio)"
)
else
()
set
(
HAVE_CAMV4L2_STR
"NO"
)
endif
()
status
(
" V4L/V4L2:"
HAVE_LIBV4L THEN
"Using libv4l (ver
${
ALIASOF_libv4l1_VERSION
}
)"
ELSE
"
${
HAVE_CAMV4L_STR
}
/
${
HAVE_CAMV4L2_STR
}
"
)
ELSE
"
${
HAVE_CAMV4L_STR
}
/
${
HAVE_CAMV4L2_STR
}
"
)
endif
(
DEFINED WITH_V4L
)
if
(
DEFINED WITH_VIDEOINPUT
)
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
c78cb219
...
...
@@ -85,11 +85,12 @@ if(WITH_XINE)
endif
(
WITH_XINE
)
# --- V4L ---
ocv_clear_vars
(
HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2
)
ocv_clear_vars
(
HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2
HAVE_VIDEOIO
)
if
(
WITH_V4L
)
CHECK_MODULE
(
libv4l1 HAVE_LIBV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev.h HAVE_CAMV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev2.h HAVE_CAMV4L2
)
CHECK_INCLUDE_FILE
(
sys/videoio.h HAVE_VIDEOIO
)
endif
(
WITH_V4L
)
# --- OpenNI ---
...
...
cmake/templates/cvconfig.h.cmake
View file @
c78cb219
...
...
@@ -19,6 +19,9 @@
/* V4L2 capturing support */
#cmakedefine HAVE_CAMV4L2
/* V4L2 capturing support in videoio.h */
#cmakedefine HAVE_VIDEOIO
/* V4L/V4L2 capturing support via libv4l */
#cmakedefine HAVE_LIBV4L
...
...
modules/highgui/CMakeLists.txt
View file @
c78cb219
...
...
@@ -131,7 +131,7 @@ endif(HAVE_UNICAP)
if
(
HAVE_LIBV4L
)
list
(
APPEND highgui_srcs src/cap_libv4l.cpp
)
elseif
(
HAVE_CAMV4L OR HAVE_CAMV4L2
)
elseif
(
HAVE_CAMV4L OR HAVE_CAMV4L2
OR HAVE_VIDEOIO
)
list
(
APPEND highgui_srcs src/cap_v4l.cpp
)
endif
()
...
...
modules/highgui/src/cap.cpp
View file @
c78cb219
...
...
@@ -172,7 +172,9 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
defined(HAVE_TYZX) || \
defined(HAVE_VFW) || \
defined(HAVE_LIBV4L) || \
(defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2)) || \
defined(HAVE_CAMV4L) || \
defined(HAVE_CAMV4L2) || \
defined(HAVE_VIDEOIO) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_DC1394_2) || \
defined(HAVE_DC1394) || \
...
...
@@ -216,7 +218,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
return
capture
;
#endif
#if defined HAVE_LIBV4L ||
(defined (HAVE_CAMV4L) && defined (HAVE_CAMV4L2))
#if defined HAVE_LIBV4L ||
defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
capture
=
cvCreateCameraCapture_V4L
(
index
);
if
(
capture
)
return
capture
;
...
...
modules/highgui/src/cap_libv4l.cpp
View file @
c78cb219
...
...
@@ -346,7 +346,11 @@ static int numCameras = 0;
static
int
indexList
=
0
;
// IOCTL handling for V4L2
#ifdef HAVE_IOCTL_ULONG
static
int
xioctl
(
int
fd
,
unsigned
long
request
,
void
*
arg
)
#else
static
int
xioctl
(
int
fd
,
int
request
,
void
*
arg
)
#endif
{
int
r
;
...
...
modules/highgui/src/cap_v4l.cpp
View file @
c78cb219
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment