Merge pull request #13126 from mshabunin:remove_libv4l
This commit is contained in:
commit
fc3fc6005e
@ -259,7 +259,6 @@ OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF
|
||||
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON IF (NOT WIN32 OR MINGW) )
|
||||
OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON IF (UNIX AND NOT ANDROID AND NOT APPLE) )
|
||||
OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" OFF IF (UNIX AND NOT ANDROID AND NOT APPLE) )
|
||||
OCV_OPTION(WITH_DSHOW "Build VideoIO with DirectShow support" ON IF (WIN32 AND NOT ARM AND NOT WINRT) )
|
||||
OCV_OPTION(WITH_MSMF "Build VideoIO with Media Foundation support" ON IF WIN32 )
|
||||
OCV_OPTION(WITH_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID AND NOT WINRT) )
|
||||
@ -1304,10 +1303,8 @@ if(APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_V4L OR WITH_LIBV4L OR HAVE_LIBV4L OR HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
status(" libv4l/libv4l2:" HAVE_LIBV4L THEN "${ALIASOF_libv4l1_VERSION} / ${ALIASOF_libv4l2_VERSION}" ELSE "NO")
|
||||
if(WITH_V4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
ocv_build_features_string(v4l_status
|
||||
IF HAVE_CAMV4L THEN "linux/videodev.h"
|
||||
IF HAVE_CAMV4L2 THEN "linux/videodev2.h"
|
||||
IF HAVE_VIDEOIO THEN "sys/videoio.h"
|
||||
ELSE "NO")
|
||||
|
||||
@ -156,18 +156,8 @@ if(WITH_XINE)
|
||||
endif(WITH_XINE)
|
||||
|
||||
# --- V4L ---
|
||||
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO)
|
||||
ocv_clear_vars(HAVE_CAMV4L2 HAVE_VIDEOIO)
|
||||
if(WITH_V4L)
|
||||
if(WITH_LIBV4L)
|
||||
CHECK_MODULE(libv4l1 HAVE_LIBV4L1 VIDEOIO)
|
||||
CHECK_MODULE(libv4l2 HAVE_LIBV4L2 VIDEOIO)
|
||||
if(HAVE_LIBV4L1 AND HAVE_LIBV4L2)
|
||||
set(HAVE_LIBV4L YES)
|
||||
else()
|
||||
set(HAVE_LIBV4L NO)
|
||||
endif()
|
||||
endif()
|
||||
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)
|
||||
|
||||
@ -25,9 +25,6 @@
|
||||
/* AVFoundation video libraries */
|
||||
#cmakedefine HAVE_AVFOUNDATION
|
||||
|
||||
/* V4L capturing support */
|
||||
#cmakedefine HAVE_CAMV4L
|
||||
|
||||
/* V4L2 capturing support */
|
||||
#cmakedefine HAVE_CAMV4L2
|
||||
|
||||
@ -116,9 +113,6 @@
|
||||
/* GDCM DICOM codec */
|
||||
#cmakedefine HAVE_GDCM
|
||||
|
||||
/* V4L/V4L2 capturing support via libv4l */
|
||||
#cmakedefine HAVE_LIBV4L
|
||||
|
||||
/* Microsoft Media Foundation Capture library */
|
||||
#cmakedefine HAVE_MSMF
|
||||
|
||||
|
||||
@ -62,12 +62,11 @@ yum install cmake
|
||||
yum install python-devel numpy
|
||||
yum install gcc gcc-c++
|
||||
@endcode
|
||||
Next we need **GTK** support for GUI features, Camera support (libdc1394, libv4l), Media Support
|
||||
Next we need **GTK** support for GUI features, Camera support (libdc1394, v4l), Media Support
|
||||
(ffmpeg, gstreamer) etc.
|
||||
@code{.sh}
|
||||
yum install gtk2-devel
|
||||
yum install libdc1394-devel
|
||||
yum install libv4l-devel
|
||||
yum install ffmpeg-devel
|
||||
yum install gstreamer-plugins-base-devel
|
||||
@endcode
|
||||
|
||||
@ -66,12 +66,11 @@ sudo apt-get install python-devel numpy
|
||||
sudo apt-get install gcc gcc-c++
|
||||
```
|
||||
|
||||
Next we need **GTK** support for GUI features, Camera support (libv4l), Media Support
|
||||
Next we need **GTK** support for GUI features, Camera support (v4l), Media Support
|
||||
(ffmpeg, gstreamer) etc.
|
||||
|
||||
```
|
||||
sudo apt-get install gtk2-devel
|
||||
sudo apt-get install libv4l-devel
|
||||
sudo apt-get install ffmpeg-devel
|
||||
sudo apt-get install gstreamer-plugins-base-devel
|
||||
```
|
||||
|
||||
@ -105,9 +105,7 @@ if(HAVE_GSTREAMER)
|
||||
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_gstreamer.cpp)
|
||||
endif(HAVE_GSTREAMER)
|
||||
|
||||
if(HAVE_LIBV4L)
|
||||
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_libv4l.cpp)
|
||||
elseif(HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
if(HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_v4l.cpp)
|
||||
endif()
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ See @ref videoio_overview for more information.
|
||||
enum VideoCaptureAPIs {
|
||||
CAP_ANY = 0, //!< Auto detect == 0
|
||||
CAP_VFW = 200, //!< Video For Windows (obsolete, removed)
|
||||
CAP_V4L = 200, //!< V4L/V4L2 capturing support via libv4l
|
||||
CAP_V4L = 200, //!< V4L/V4L2 capturing support
|
||||
CAP_V4L2 = CAP_V4L, //!< Same as CAP_V4L
|
||||
CAP_FIREWIRE = 300, //!< IEEE 1394 drivers
|
||||
CAP_FIREWARE = CAP_FIREWIRE, //!< Same value as CAP_FIREWIRE
|
||||
|
||||
@ -28,7 +28,7 @@ Install dc1394 raw1394 - coriander should work with your camera
|
||||
The build is controlled by the following entries in the videoio Makefile:
|
||||
|
||||
libvideoio_la_LIBADD = -L/usr/X11R6/lib -lXm -lMrm -lUil -lpng -ljpeg -lz -ltiff -lavcodec -lraw1394 -ldc1394_control
|
||||
DEFS = -DHAVE_CONFIG_H -DHAVE_DC1394 HAVE_CAMV4L
|
||||
DEFS = -DHAVE_CONFIG_H -DHAVE_DC1394
|
||||
|
||||
|
||||
Now it should be possible to use videoio camera functions, works for me.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -82,8 +82,8 @@ static const struct VideoBackendInfo builtin_backends[] =
|
||||
// Linux, some Unix
|
||||
#if defined HAVE_CAMV4L2
|
||||
DECLARE_BACKEND(CAP_V4L2, "V4L2", MODE_CAPTURE_ALL),
|
||||
#elif defined HAVE_LIBV4L || defined HAVE_CAMV4L
|
||||
DECLARE_BACKEND(CAP_V4L, "V4L", MODE_CAPTURE_ALL),
|
||||
#elif defined HAVE_VIDEOIO
|
||||
DECLARE_BACKEND(CAP_V4L, "V4L_BSD", MODE_CAPTURE_ALL),
|
||||
#endif
|
||||
|
||||
|
||||
@ -433,6 +433,11 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
|
||||
case CAP_GPHOTO2:
|
||||
TRY_OPEN(createGPhoto2Capture(index));
|
||||
break;
|
||||
#endif
|
||||
#if defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
|
||||
case CAP_V4L:
|
||||
TRY_OPEN_LEGACY(cvCreateCameraCapture_V4L(index))
|
||||
break;
|
||||
#endif
|
||||
case CAP_FIREWIRE:
|
||||
#ifdef HAVE_DC1394_2
|
||||
@ -493,7 +498,7 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
|
||||
default:
|
||||
CV_LOG_WARNING(NULL, "VideoCapture(filename=" << filename << ") was built without support of requested backendID=" << (int)api);
|
||||
break;
|
||||
#if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
|
||||
#if defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
|
||||
case CAP_V4L:
|
||||
TRY_OPEN_LEGACY(cvCreateCameraCapture_V4L(filename.c_str()))
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user