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
ebc80156
Unverified
Commit
ebc80156
authored
Nov 08, 2018
by
Alexander Alekhin
Committed by
GitHub
Nov 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13074 from alalek:cleanup_videoio
parents
35c7cab7
5869415a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
19 additions
and
527 deletions
+19
-527
CMakeLists.txt
CMakeLists.txt
+1
-19
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+0
-29
vfwtest.cpp
cmake/checks/vfwtest.cpp
+0
-10
cvconfig.h.in
cmake/templates/cvconfig.h.in
+0
-16
CMakeLists.txt
modules/videoio/CMakeLists.txt
+0
-24
videoio_overview.markdown
modules/videoio/doc/videoio_overview.markdown
+3
-3
videoio.hpp
modules/videoio/include/opencv2/videoio.hpp
+9
-9
perf_output.cpp
modules/videoio/perf/perf_output.cpp
+1
-1
cap_cmu.cpp
modules/videoio/src/cap_cmu.cpp
+0
-0
cap_qt.cpp
modules/videoio/src/cap_qt.cpp
+0
-0
cap_qtkit.mm
modules/videoio/src/cap_qtkit.mm
+0
-0
cap_unicap.cpp
modules/videoio/src/cap_unicap.cpp
+0
-332
cap_vfw.cpp
modules/videoio/src/cap_vfw.cpp
+0
-0
precomp.hpp
modules/videoio/src/precomp.hpp
+2
-9
videoio_registry.cpp
modules/videoio/src/videoio_registry.cpp
+3
-58
test_video_io.cpp
modules/videoio/test/test_video_io.cpp
+0
-17
No files found.
CMakeLists.txt
View file @
ebc80156
...
@@ -228,7 +228,6 @@ OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT)
...
@@ -228,7 +228,6 @@ OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT)
OCV_OPTION
(
WITH_CUBLAS
"Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support"
ON
IF
(
NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_CUBLAS
"Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support"
ON
IF
(
NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_NVCUVID
"Include NVidia Video Decoding library support"
ON
IF
(
NOT IOS AND NOT APPLE
)
)
OCV_OPTION
(
WITH_NVCUVID
"Include NVidia Video Decoding library support"
ON
IF
(
NOT IOS AND NOT APPLE
)
)
OCV_OPTION
(
WITH_EIGEN
"Include Eigen2/Eigen3 support"
(
NOT CV_DISABLE_OPTIMIZATION
)
IF
(
NOT WINRT AND NOT CMAKE_CROSSCOMPILING
)
)
OCV_OPTION
(
WITH_EIGEN
"Include Eigen2/Eigen3 support"
(
NOT CV_DISABLE_OPTIMIZATION
)
IF
(
NOT WINRT AND NOT CMAKE_CROSSCOMPILING
)
)
OCV_OPTION
(
WITH_VFW
"Include Video for Windows support"
ON IF WIN32
)
OCV_OPTION
(
WITH_FFMPEG
"Include FFMPEG support"
ON
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_FFMPEG
"Include FFMPEG support"
ON
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_GSTREAMER_0_10
"Enable Gstreamer 0.10 support (instead of 1.x)"
OFF
)
OCV_OPTION
(
WITH_GSTREAMER_0_10
"Enable Gstreamer 0.10 support (instead of 1.x)"
OFF
)
...
@@ -253,14 +252,11 @@ OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF
...
@@ -253,14 +252,11 @@ OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF
OCV_OPTION
(
WITH_ARAVIS
"Include Aravis GigE support"
OFF
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32
)
)
OCV_OPTION
(
WITH_ARAVIS
"Include Aravis GigE support"
OFF
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32
)
)
OCV_OPTION
(
WITH_QT
"Build with Qt Backend support"
OFF
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_QT
"Build with Qt Backend support"
OFF
IF
(
NOT ANDROID AND NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_WIN32UI
"Build with Win32 UI Backend support"
ON IF WIN32 AND NOT WINRT
)
OCV_OPTION
(
WITH_WIN32UI
"Build with Win32 UI Backend support"
ON IF WIN32 AND NOT WINRT
)
OCV_OPTION
(
WITH_QUICKTIME
"Use QuickTime for Video I/O (OBSOLETE)"
OFF IF APPLE
)
OCV_OPTION
(
WITH_QTKIT
"Use QTKit Video I/O backend"
OFF IF APPLE
)
OCV_OPTION
(
WITH_TBB
"Include Intel TBB support"
OFF
IF
(
NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_TBB
"Include Intel TBB support"
OFF
IF
(
NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_HPX
"Include Ste||ar Group HPX support"
OFF
)
OCV_OPTION
(
WITH_HPX
"Include Ste||ar Group HPX support"
OFF
)
OCV_OPTION
(
WITH_OPENMP
"Include OpenMP support"
OFF
)
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_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_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 ANDROID AND NOT APPLE
)
)
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_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_DSHOW
"Build VideoIO with DirectShow support"
ON
IF
(
WIN32 AND NOT ARM AND NOT WINRT
)
)
...
@@ -1245,15 +1241,9 @@ endif()
...
@@ -1245,15 +1241,9 @@ endif()
status
(
""
)
status
(
""
)
status
(
" Video I/O:"
)
status
(
" Video I/O:"
)
if
(
WITH_VFW OR HAVE_VFW
)
if
(
WITH_1394 OR HAVE_DC1394_2
)
status
(
" Video for Windows:"
HAVE_VFW THEN YES ELSE NO
)
endif
()
if
(
WITH_1394 OR HAVE_DC1394
)
if
(
HAVE_DC1394_2
)
if
(
HAVE_DC1394_2
)
status
(
" DC1394:"
"YES (ver
${
ALIASOF_libdc1394-2_VERSION
}
)"
)
status
(
" DC1394:"
"YES (ver
${
ALIASOF_libdc1394-2_VERSION
}
)"
)
elseif
(
HAVE_DC1394
)
status
(
" DC1394:"
"YES (ver
${
ALIASOF_libdc1394_VERSION
}
)"
)
else
()
else
()
status
(
" DC1394:"
"NO"
)
status
(
" DC1394:"
"NO"
)
endif
()
endif
()
...
@@ -1311,14 +1301,6 @@ if(APPLE)
...
@@ -1311,14 +1301,6 @@ if(APPLE)
if
(
WITH_QUICKTIME OR HAVE_QUICKTIME
)
if
(
WITH_QUICKTIME OR HAVE_QUICKTIME
)
status
(
" QuickTime:"
HAVE_QUICKTIME THEN YES ELSE NO
)
status
(
" QuickTime:"
HAVE_QUICKTIME THEN YES ELSE NO
)
endif
()
endif
()
if
(
WITH_QTKIT OR HAVE_QTKIT
)
status
(
" QTKit:"
HAVE_QTKIT THEN
"YES (deprecated)"
ELSE NO
)
endif
()
endif
()
if
(
WITH_UNICAP OR HAVE_UNICAP
)
status
(
" UniCap:"
HAVE_UNICAP THEN
"YES (ver
${
ALIASOF_libunicap_VERSION
}
)"
ELSE NO
)
status
(
" UniCap ucil:"
HAVE_UNICAP_UCIL THEN
"YES (ver
${
ALIASOF_libucil_VERSION
}
)"
ELSE NO
)
endif
()
endif
()
if
(
WITH_V4L OR WITH_LIBV4L OR HAVE_LIBV4L OR HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO
)
if
(
WITH_V4L OR WITH_LIBV4L OR HAVE_LIBV4L OR HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO
)
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
ebc80156
...
@@ -2,14 +2,6 @@
...
@@ -2,14 +2,6 @@
# Detect 3rd-party video IO libraries
# Detect 3rd-party video IO libraries
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
ocv_clear_vars
(
HAVE_VFW
)
if
(
WITH_VFW
)
try_compile
(
HAVE_VFW
"
${
OpenCV_BINARY_DIR
}
"
"
${
OpenCV_SOURCE_DIR
}
/cmake/checks/vfwtest.cpp"
CMAKE_FLAGS
"-DLINK_LIBRARIES:STRING=vfw32"
)
endif
(
WITH_VFW
)
# --- GStreamer ---
# --- GStreamer ---
ocv_clear_vars
(
HAVE_GSTREAMER
)
ocv_clear_vars
(
HAVE_GSTREAMER
)
# try to find gstreamer 1.x first if 0.10 was not requested
# try to find gstreamer 1.x first if 0.10 was not requested
...
@@ -62,16 +54,6 @@ if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)
...
@@ -62,16 +54,6 @@ if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)
endif
()
endif
()
endif
(
WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10
)
endif
(
WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10
)
# --- unicap ---
ocv_clear_vars
(
HAVE_UNICAP
)
if
(
WITH_UNICAP
)
CHECK_MODULE
(
libunicap HAVE_UNICAP_ VIDEOIO
)
CHECK_MODULE
(
libucil HAVE_UNICAP_UCIL VIDEOIO
)
if
(
HAVE_UNICAP_ AND HAVE_UNICAP_UCIL
)
set
(
HAVE_UNICAP TRUE
)
endif
()
endif
(
WITH_UNICAP
)
# --- PvApi ---
# --- PvApi ---
ocv_clear_vars
(
HAVE_PVAPI
)
ocv_clear_vars
(
HAVE_PVAPI
)
if
(
WITH_PVAPI
)
if
(
WITH_PVAPI
)
...
@@ -286,12 +268,8 @@ endif(WITH_MSMF)
...
@@ -286,12 +268,8 @@ endif(WITH_MSMF)
# --- Extra HighGUI and VideoIO libs on Windows ---
# --- Extra HighGUI and VideoIO libs on Windows ---
if
(
WIN32
)
if
(
WIN32
)
list
(
APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32
)
list
(
APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32
)
if
(
HAVE_VFW
)
list
(
APPEND VIDEOIO_LIBRARIES vfw32
)
endif
()
if
(
MINGW64
)
if
(
MINGW64
)
list
(
APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32
)
list
(
APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32
)
list
(
REMOVE_ITEM VIDEOIO_LIBRARIES vfw32
)
elseif
(
MINGW
)
elseif
(
MINGW
)
list
(
APPEND VIDEOIO_LIBRARIES winmm
)
list
(
APPEND VIDEOIO_LIBRARIES winmm
)
endif
()
endif
()
...
@@ -301,13 +279,6 @@ if(APPLE)
...
@@ -301,13 +279,6 @@ if(APPLE)
if
(
WITH_AVFOUNDATION
)
if
(
WITH_AVFOUNDATION
)
set
(
HAVE_AVFOUNDATION YES
)
set
(
HAVE_AVFOUNDATION YES
)
endif
()
endif
()
if
(
NOT IOS
)
if
(
WITH_QUICKTIME
)
set
(
HAVE_QUICKTIME YES
)
elseif
(
WITH_QTKIT
)
set
(
HAVE_QTKIT YES
)
endif
()
endif
()
endif
(
APPLE
)
endif
(
APPLE
)
# --- Intel librealsense ---
# --- Intel librealsense ---
...
...
cmake/checks/vfwtest.cpp
deleted
100644 → 0
View file @
35c7cab7
#include <windows.h>
#include <vfw.h>
int
main
()
{
AVIFileInit
();
AVIFileExit
();
return
0
;
}
cmake/templates/cvconfig.h.in
View file @
ebc80156
...
@@ -163,12 +163,6 @@
...
@@ -163,12 +163,6 @@
/* Qt OpenGL support */
/* Qt OpenGL support */
#cmakedefine HAVE_QT_OPENGL
#cmakedefine HAVE_QT_OPENGL
/* QuickTime video libraries */
#cmakedefine HAVE_QUICKTIME
/* QTKit video libraries */
#cmakedefine HAVE_QTKIT
/* Intel Threading Building Blocks */
/* Intel Threading Building Blocks */
#cmakedefine HAVE_TBB
#cmakedefine HAVE_TBB
...
@@ -178,12 +172,6 @@
...
@@ -178,12 +172,6 @@
/* TIFF codec */
/* TIFF codec */
#cmakedefine HAVE_TIFF
#cmakedefine HAVE_TIFF
/* Unicap video capture library */
#cmakedefine HAVE_UNICAP
/* Video for Windows support */
#cmakedefine HAVE_VFW
/* V4L2 capturing support in videoio.h */
/* V4L2 capturing support in videoio.h */
#cmakedefine HAVE_VIDEOIO
#cmakedefine HAVE_VIDEOIO
...
@@ -223,8 +211,6 @@
...
@@ -223,8 +211,6 @@
#if defined(HAVE_XINE) || \
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_AVFOUNDATION) || \
/*defined(HAVE_OPENNI) || too specialized */ \
/*defined(HAVE_OPENNI) || too specialized */ \
defined(HAVE_FFMPEG) || \
defined(HAVE_FFMPEG) || \
...
@@ -234,8 +220,6 @@
...
@@ -234,8 +220,6 @@
#if /*defined(HAVE_XINE) || */\
#if /*defined(HAVE_XINE) || */\
defined(HAVE_GSTREAMER) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
defined(HAVE_MSMF)
...
...
modules/videoio/CMakeLists.txt
View file @
ebc80156
...
@@ -73,10 +73,6 @@ if(HAVE_MFX)
...
@@ -73,10 +73,6 @@ if(HAVE_MFX)
list
(
APPEND VIDEOIO_LIBRARIES mfx
)
list
(
APPEND VIDEOIO_LIBRARIES mfx
)
endif
()
endif
()
if
(
WIN32 AND NOT ARM
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_cmu.cpp
)
endif
()
if
(
WIN32 AND HAVE_DSHOW
)
if
(
WIN32 AND HAVE_DSHOW
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dshow.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dshow.cpp
)
list
(
APPEND videoio_hdrs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dshow.hpp
)
list
(
APPEND videoio_hdrs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dshow.hpp
)
...
@@ -93,10 +89,6 @@ if (WIN32 AND HAVE_MSMF)
...
@@ -93,10 +89,6 @@ if (WIN32 AND HAVE_MSMF)
endif
()
endif
()
endif
()
endif
()
if
(
WIN32 AND HAVE_VFW
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_vfw.cpp
)
endif
()
if
(
HAVE_XINE
)
if
(
HAVE_XINE
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_xine.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_xine.cpp
)
endif
(
HAVE_XINE
)
endif
(
HAVE_XINE
)
...
@@ -105,10 +97,6 @@ if(HAVE_DC1394_2)
...
@@ -105,10 +97,6 @@ if(HAVE_DC1394_2)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dc1394_v2.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dc1394_v2.cpp
)
endif
(
HAVE_DC1394_2
)
endif
(
HAVE_DC1394_2
)
if
(
HAVE_DC1394
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_dc1394.cpp
)
endif
(
HAVE_DC1394
)
if
(
HAVE_GSTREAMER
)
if
(
HAVE_GSTREAMER
)
IF
(
WIN32
)
IF
(
WIN32
)
INCLUDE_DIRECTORIES
(
${
GSTREAMER_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
GSTREAMER_INCLUDE_DIR
}
)
...
@@ -117,10 +105,6 @@ if(HAVE_GSTREAMER)
...
@@ -117,10 +105,6 @@ if(HAVE_GSTREAMER)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_gstreamer.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_gstreamer.cpp
)
endif
(
HAVE_GSTREAMER
)
endif
(
HAVE_GSTREAMER
)
if
(
HAVE_UNICAP
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_unicap.cpp
)
endif
(
HAVE_UNICAP
)
if
(
HAVE_LIBV4L
)
if
(
HAVE_LIBV4L
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_libv4l.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_libv4l.cpp
)
elseif
(
HAVE_CAMV4L2 OR HAVE_VIDEOIO
)
elseif
(
HAVE_CAMV4L2 OR HAVE_VIDEOIO
)
...
@@ -206,14 +190,6 @@ if(HAVE_AVFOUNDATION)
...
@@ -206,14 +190,6 @@ if(HAVE_AVFOUNDATION)
endif
()
endif
()
endif
()
endif
()
if
(
HAVE_QUICKTIME
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_qt.cpp
)
list
(
APPEND VIDEOIO_LIBRARIES
"-framework Carbon"
"-framework QuickTime"
"-framework CoreFoundation"
"-framework QuartzCore"
)
elseif
(
HAVE_QTKIT
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_qtkit.mm
)
list
(
APPEND VIDEOIO_LIBRARIES
"-framework QTKit"
"-framework QuartzCore"
"-framework AppKit"
)
endif
()
if
(
HAVE_INTELPERC
)
if
(
HAVE_INTELPERC
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_intelperc.cpp
)
list
(
APPEND videoio_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/cap_intelperc.cpp
)
ocv_include_directories
(
${
INTELPERC_INCLUDE_DIR
}
)
ocv_include_directories
(
${
INTELPERC_INCLUDE_DIR
}
)
...
...
modules/videoio/doc/videoio_overview.markdown
View file @
ebc80156
...
@@ -15,7 +15,7 @@ I/O APIs used as backend.
...
@@ -15,7 +15,7 @@ I/O APIs used as backend.
![
Video I/O with OpenCV
](
pics/videoio_overview.svg
)
![
Video I/O with OpenCV
](
pics/videoio_overview.svg
)
Some backends such as (DSHOW) Direct Show,
Video For Windows (VFW),
Microsoft Media Foundation (MSMF),
Some backends such as (DSHOW) Direct Show, Microsoft Media Foundation (MSMF),
Video 4 Linux (V4L), etc... are interfaces to the video I/O library provided by the operating system.
Video 4 Linux (V4L), etc... are interfaces to the video I/O library provided by the operating system.
Some others backends like OpenNI2 for Kinect, Intel Perceptual Computing SDK, GStreamer,
Some others backends like OpenNI2 for Kinect, Intel Perceptual Computing SDK, GStreamer,
...
@@ -62,11 +62,11 @@ cap.open(filename, cv::CAP_DSHOW);
...
@@ -62,11 +62,11 @@ cap.open(filename, cv::CAP_DSHOW);
Backends are available only if they have been built with your OpenCV binaries.
Backends are available only if they have been built with your OpenCV binaries.
Check in
`opencv2/cvconfig.h`
to know which APIs are currently available
Check in
`opencv2/cvconfig.h`
to know which APIs are currently available
(e.g.
`HAVE_MSMF, HAVE_V
FW, HAVE_LIBV4L
`
, etc...).
(e.g.
`HAVE_MSMF, HAVE_V
4L2
`
, etc...).
To enable/disable APIs, you have to:
To enable/disable APIs, you have to:
1.
re-configure OpenCV using appropriates CMake switches
1.
re-configure OpenCV using appropriates CMake switches
(e.g.
`-DWITH_MSMF=ON -DWITH_
VF
W=ON ... `
) or checking related switch in cmake-gui
(e.g.
`-DWITH_MSMF=ON -DWITH_
DSHO
W=ON ... `
) or checking related switch in cmake-gui
2.
rebuild OpenCV itself
2.
rebuild OpenCV itself
#### Use 3rd party drivers or cameras
#### Use 3rd party drivers or cameras
...
...
modules/videoio/include/opencv2/videoio.hpp
View file @
ebc80156
...
@@ -88,16 +88,16 @@ See @ref videoio_overview for more information.
...
@@ -88,16 +88,16 @@ See @ref videoio_overview for more information.
*/
*/
enum
VideoCaptureAPIs
{
enum
VideoCaptureAPIs
{
CAP_ANY
=
0
,
//!< Auto detect == 0
CAP_ANY
=
0
,
//!< Auto detect == 0
CAP_VFW
=
200
,
//!< Video For Windows (
platform native
)
CAP_VFW
=
200
,
//!< Video For Windows (
obsolete, removed
)
CAP_V4L
=
200
,
//!< V4L/V4L2 capturing support via libv4l
CAP_V4L
=
200
,
//!< V4L/V4L2 capturing support via libv4l
CAP_V4L2
=
CAP_V4L
,
//!< Same as CAP_V4L
CAP_V4L2
=
CAP_V4L
,
//!< Same as CAP_V4L
CAP_FIREWIRE
=
300
,
//!< IEEE 1394 drivers
CAP_FIREWIRE
=
300
,
//!< IEEE 1394 drivers
CAP_FIREWARE
=
CAP_FIREWIRE
,
//!< Same as CAP_FIREWIRE
CAP_FIREWARE
=
CAP_FIREWIRE
,
//!< Same
value
as CAP_FIREWIRE
CAP_IEEE1394
=
CAP_FIREWIRE
,
//!< Same as CAP_FIREWIRE
CAP_IEEE1394
=
CAP_FIREWIRE
,
//!< Same
value
as CAP_FIREWIRE
CAP_DC1394
=
CAP_FIREWIRE
,
//!< Same as CAP_FIREWIRE
CAP_DC1394
=
CAP_FIREWIRE
,
//!< Same
value
as CAP_FIREWIRE
CAP_CMU1394
=
CAP_FIREWIRE
,
//!< Same as CAP_FIREWIRE
CAP_CMU1394
=
CAP_FIREWIRE
,
//!< Same
value
as CAP_FIREWIRE
CAP_QT
=
500
,
//!< QuickTime
CAP_QT
=
500
,
//!< QuickTime
(obsolete, removed)
CAP_UNICAP
=
600
,
//!< Unicap drivers
CAP_UNICAP
=
600
,
//!< Unicap drivers
(obsolete, removed)
CAP_DSHOW
=
700
,
//!< DirectShow (via videoInput)
CAP_DSHOW
=
700
,
//!< DirectShow (via videoInput)
CAP_PVAPI
=
800
,
//!< PvAPI, Prosilica GigE SDK
CAP_PVAPI
=
800
,
//!< PvAPI, Prosilica GigE SDK
CAP_OPENNI
=
900
,
//!< OpenNI (for Kinect)
CAP_OPENNI
=
900
,
//!< OpenNI (for Kinect)
...
@@ -815,8 +815,8 @@ public:
...
@@ -815,8 +815,8 @@ public:
The constructors/functions initialize video writers.
The constructors/functions initialize video writers.
- On Linux FFMPEG is used to write videos;
- On Linux FFMPEG is used to write videos;
- On Windows FFMPEG or
VF
W is used;
- On Windows FFMPEG or
MSWF or DSHO
W is used;
- On MacOSX
QTKit
is used.
- On MacOSX
AVFoundation
is used.
*/
*/
CV_WRAP
VideoWriter
();
CV_WRAP
VideoWriter
();
...
...
modules/videoio/perf/perf_output.cpp
View file @
ebc80156
...
@@ -29,7 +29,7 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
...
@@ -29,7 +29,7 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
const
string
filename
=
getDataPath
(
get
<
0
>
(
GetParam
()));
const
string
filename
=
getDataPath
(
get
<
0
>
(
GetParam
()));
const
bool
isColor
=
get
<
1
>
(
GetParam
());
const
bool
isColor
=
get
<
1
>
(
GetParam
());
Mat
image
=
imread
(
filename
,
isColor
?
IMREAD_COLOR
:
IMREAD_GRAYSCALE
);
Mat
image
=
imread
(
filename
,
isColor
?
IMREAD_COLOR
:
IMREAD_GRAYSCALE
);
#if defined(HAVE_MSMF) && !defined(HAVE_
VFW) && !defined(HAVE_FFMPEG) // VFW has greater priority
#if defined(HAVE_MSMF) && !defined(HAVE_
FFMPEG)
const
string
outfile
=
cv
::
tempfile
(
".wmv"
);
const
string
outfile
=
cv
::
tempfile
(
".wmv"
);
const
int
fourcc
=
VideoWriter
::
fourcc
(
'W'
,
'M'
,
'V'
,
'3'
);
const
int
fourcc
=
VideoWriter
::
fourcc
(
'W'
,
'M'
,
'V'
,
'3'
);
#else
#else
...
...
modules/videoio/src/cap_cmu.cpp
deleted
100644 → 0
View file @
35c7cab7
This diff is collapsed.
Click to expand it.
modules/videoio/src/cap_qt.cpp
deleted
100644 → 0
View file @
35c7cab7
This diff is collapsed.
Click to expand it.
modules/videoio/src/cap_qtkit.mm
deleted
100644 → 0
View file @
35c7cab7
This diff is collapsed.
Click to expand it.
modules/videoio/src/cap_unicap.cpp
deleted
100644 → 0
View file @
35c7cab7
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// Intel License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2008, Xavier Delacour, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of Intel Corporation may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
// 2008-04-27 Xavier Delacour <xavier.delacour@gmail.com>
#include "precomp.hpp"
#include <unistd.h>
#include <unicap.h>
extern
"C"
{
#include <ucil.h>
}
#ifdef NDEBUG
#define CV_WARN(message)
#else
#define CV_WARN(message) fprintf(stderr, "warning: %s (%s:%d)\n", message, __FILE__, __LINE__)
#endif
struct
CvCapture_Unicap
:
public
CvCapture
{
CvCapture_Unicap
()
{
init
();
}
virtual
~
CvCapture_Unicap
()
{
close
();
}
virtual
bool
open
(
int
index
);
virtual
void
close
();
virtual
double
getProperty
(
int
)
const
CV_OVERRIDE
;
virtual
bool
setProperty
(
int
,
double
)
CV_OVERRIDE
;
virtual
bool
grabFrame
()
CV_OVERRIDE
;
virtual
IplImage
*
retrieveFrame
(
int
)
CV_OVERRIDE
;
virtual
int
getCaptureDomain
()
CV_OVERRIDE
{
return
CV_CAP_UNICAP
;
}
bool
shutdownDevice
();
bool
initDevice
();
void
init
()
{
device_initialized
=
false
;
desired_format
=
0
;
desired_size
=
cvSize
(
0
,
0
);
convert_rgb
=
false
;
handle
=
0
;
memset
(
&
device
,
0
,
sizeof
(
device
)
);
memset
(
&
format_spec
,
0
,
sizeof
(
format_spec
)
);
memset
(
&
format
,
0
,
sizeof
(
format
)
);
memset
(
&
raw_buffer
,
0
,
sizeof
(
raw_buffer
)
);
memset
(
&
buffer
,
0
,
sizeof
(
buffer
)
);
raw_frame
=
frame
=
0
;
}
bool
device_initialized
;
int
desired_device
;
int
desired_format
;
CvSize
desired_size
;
bool
convert_rgb
;
unicap_handle_t
handle
;
unicap_device_t
device
;
unicap_format_t
format_spec
;
unicap_format_t
format
;
unicap_data_buffer_t
raw_buffer
;
unicap_data_buffer_t
buffer
;
IplImage
*
raw_frame
;
IplImage
*
frame
;
};
bool
CvCapture_Unicap
::
shutdownDevice
()
{
bool
result
=
false
;
CV_FUNCNAME
(
"CvCapture_Unicap::shutdownDevice"
);
__BEGIN__
;
if
(
!
SUCCESS
(
unicap_stop_capture
(
handle
)))
CV_ERROR
(
CV_StsError
,
"unicap: failed to stop capture on device
\n
"
);
if
(
!
SUCCESS
(
unicap_close
(
handle
)))
CV_ERROR
(
CV_StsError
,
"unicap: failed to close the device
\n
"
);
cvReleaseImage
(
&
raw_frame
);
cvReleaseImage
(
&
frame
);
device_initialized
=
false
;
result
=
true
;
__END__
;
return
result
;
}
bool
CvCapture_Unicap
::
initDevice
()
{
bool
result
=
false
;
CV_FUNCNAME
(
"CvCapture_Unicap::initDevice"
);
__BEGIN__
;
if
(
device_initialized
&&
!
shutdownDevice
())
return
false
;
if
(
!
SUCCESS
(
unicap_enumerate_devices
(
NULL
,
&
device
,
desired_device
)))
CV_ERROR
(
CV_StsError
,
"unicap: failed to get info for device
\n
"
);
if
(
!
SUCCESS
(
unicap_open
(
&
handle
,
&
device
)))
CV_ERROR
(
CV_StsError
,
"unicap: failed to open device
\n
"
);
unicap_void_format
(
&
format_spec
);
if
(
!
SUCCESS
(
unicap_enumerate_formats
(
handle
,
&
format_spec
,
&
format
,
desired_format
)))
{
shutdownDevice
();
CV_ERROR
(
CV_StsError
,
"unicap: failed to get video format
\n
"
);
}
int
i
;
if
(
format
.
sizes
)
{
for
(
i
=
format
.
size_count
-
1
;
i
>
0
;
i
--
)
if
(
format
.
sizes
[
i
].
width
==
desired_size
.
width
&&
format
.
sizes
[
i
].
height
==
desired_size
.
height
)
break
;
format
.
size
.
width
=
format
.
sizes
[
i
].
width
;
format
.
size
.
height
=
format
.
sizes
[
i
].
height
;
}
if
(
!
SUCCESS
(
unicap_set_format
(
handle
,
&
format
)))
{
shutdownDevice
();
CV_ERROR
(
CV_StsError
,
"unicap: failed to set video format
\n
"
);
}
memset
(
&
raw_buffer
,
0x0
,
sizeof
(
unicap_data_buffer_t
));
raw_frame
=
cvCreateImage
(
cvSize
(
format
.
size
.
width
,
format
.
size
.
height
),
8
,
format
.
bpp
/
8
);
memcpy
(
&
raw_buffer
.
format
,
&
format
,
sizeof
(
raw_buffer
.
format
));
raw_buffer
.
data
=
(
unsigned
char
*
)
raw_frame
->
imageData
;
raw_buffer
.
buffer_size
=
format
.
size
.
width
*
format
.
size
.
height
*
format
.
bpp
/
8
;
memset
(
&
buffer
,
0x0
,
sizeof
(
unicap_data_buffer_t
));
memcpy
(
&
buffer
.
format
,
&
format
,
sizeof
(
buffer
.
format
));
buffer
.
format
.
fourcc
=
UCIL_FOURCC
(
'B'
,
'G'
,
'R'
,
'3'
);
buffer
.
format
.
bpp
=
24
;
// * todo support greyscale output
// buffer.format.fourcc = UCIL_FOURCC('G','R','E','Y');
// buffer.format.bpp = 8;
frame
=
cvCreateImage
(
cvSize
(
buffer
.
format
.
size
.
width
,
buffer
.
format
.
size
.
height
),
8
,
buffer
.
format
.
bpp
/
8
);
buffer
.
data
=
(
unsigned
char
*
)
frame
->
imageData
;
buffer
.
buffer_size
=
buffer
.
format
.
size
.
width
*
buffer
.
format
.
size
.
height
*
buffer
.
format
.
bpp
/
8
;
if
(
!
SUCCESS
(
unicap_start_capture
(
handle
)))
{
shutdownDevice
();
CV_ERROR
(
CV_StsError
,
"unicap: failed to start capture on device
\n
"
);
}
device_initialized
=
true
;
result
=
true
;
__END__
;
return
result
;
}
void
CvCapture_Unicap
::
close
()
{
if
(
device_initialized
)
shutdownDevice
();
}
bool
CvCapture_Unicap
::
grabFrame
()
{
bool
result
=
false
;
CV_FUNCNAME
(
"CvCapture_Unicap::grabFrame"
);
__BEGIN__
;
unicap_data_buffer_t
*
returned_buffer
;
int
retry_count
=
100
;
while
(
retry_count
--
)
{
if
(
!
SUCCESS
(
unicap_queue_buffer
(
handle
,
&
raw_buffer
)))
CV_ERROR
(
CV_StsError
,
"unicap: failed to queue a buffer on device
\n
"
);
if
(
SUCCESS
(
unicap_wait_buffer
(
handle
,
&
returned_buffer
)))
{
result
=
true
;
EXIT
;
}
CV_WARN
(
"unicap: failed to wait for buffer on device
\n
"
);
usleep
(
100
*
1000
);
}
__END__
;
return
result
;
}
IplImage
*
CvCapture_Unicap
::
retrieveFrame
(
int
)
{
if
(
convert_rgb
)
{
ucil_convert_buffer
(
&
buffer
,
&
raw_buffer
);
return
frame
;
}
return
raw_frame
;
}
double
CvCapture_Unicap
::
getProperty
(
int
id
)
const
{
switch
(
id
)
{
case
CV_CAP_PROP_POS_MSEC
:
break
;
case
CV_CAP_PROP_POS_FRAMES
:
break
;
case
CV_CAP_PROP_POS_AVI_RATIO
:
break
;
case
CV_CAP_PROP_FRAME_WIDTH
:
return
desired_size
.
width
;
case
CV_CAP_PROP_FRAME_HEIGHT
:
return
desired_size
.
height
;
case
CV_CAP_PROP_FPS
:
break
;
case
CV_CAP_PROP_FOURCC
:
break
;
case
CV_CAP_PROP_FRAME_COUNT
:
break
;
case
CV_CAP_PROP_FORMAT
:
return
desired_format
;
case
CV_CAP_PROP_MODE
:
break
;
case
CV_CAP_PROP_BRIGHTNESS
:
break
;
case
CV_CAP_PROP_CONTRAST
:
break
;
case
CV_CAP_PROP_SATURATION
:
break
;
case
CV_CAP_PROP_HUE
:
break
;
case
CV_CAP_PROP_GAIN
:
break
;
case
CV_CAP_PROP_CONVERT_RGB
:
return
convert_rgb
;
}
return
0
;
}
bool
CvCapture_Unicap
::
setProperty
(
int
id
,
double
value
)
{
bool
reinit
=
false
;
switch
(
id
)
{
case
CV_CAP_PROP_POS_MSEC
:
break
;
case
CV_CAP_PROP_POS_FRAMES
:
break
;
case
CV_CAP_PROP_POS_AVI_RATIO
:
break
;
case
CV_CAP_PROP_FRAME_WIDTH
:
desired_size
.
width
=
(
int
)
value
;
reinit
=
true
;
break
;
case
CV_CAP_PROP_FRAME_HEIGHT
:
desired_size
.
height
=
(
int
)
value
;
reinit
=
true
;
break
;
case
CV_CAP_PROP_FPS
:
break
;
case
CV_CAP_PROP_FOURCC
:
break
;
case
CV_CAP_PROP_FRAME_COUNT
:
break
;
case
CV_CAP_PROP_FORMAT
:
desired_format
=
id
;
reinit
=
true
;
break
;
case
CV_CAP_PROP_MODE
:
break
;
case
CV_CAP_PROP_BRIGHTNESS
:
break
;
case
CV_CAP_PROP_CONTRAST
:
break
;
case
CV_CAP_PROP_SATURATION
:
break
;
case
CV_CAP_PROP_HUE
:
break
;
case
CV_CAP_PROP_GAIN
:
break
;
case
CV_CAP_PROP_CONVERT_RGB
:
convert_rgb
=
value
!=
0
;
break
;
}
if
(
reinit
&&
!
initDevice
())
return
false
;
return
true
;
}
bool
CvCapture_Unicap
::
open
(
int
index
)
{
close
();
device_initialized
=
false
;
desired_device
=
index
<
0
?
0
:
index
;
desired_format
=
0
;
desired_size
=
cvSize
(
320
,
240
);
convert_rgb
=
true
;
return
initDevice
();
}
CvCapture
*
cvCreateCameraCapture_Unicap
(
const
int
index
)
{
CvCapture_Unicap
*
cap
=
new
CvCapture_Unicap
;
if
(
cap
->
open
(
index
)
)
return
cap
;
delete
cap
;
return
0
;
}
modules/videoio/src/cap_vfw.cpp
deleted
100644 → 0
View file @
35c7cab7
This diff is collapsed.
Click to expand it.
modules/videoio/src/precomp.hpp
View file @
ebc80156
...
@@ -93,7 +93,7 @@ struct CvCapture
...
@@ -93,7 +93,7 @@ struct CvCapture
virtual
bool
setProperty
(
int
,
double
)
{
return
0
;
}
virtual
bool
setProperty
(
int
,
double
)
{
return
0
;
}
virtual
bool
grabFrame
()
{
return
true
;
}
virtual
bool
grabFrame
()
{
return
true
;
}
virtual
IplImage
*
retrieveFrame
(
int
)
{
return
0
;
}
virtual
IplImage
*
retrieveFrame
(
int
)
{
return
0
;
}
virtual
int
getCaptureDomain
()
{
return
cv
::
CAP_ANY
;
}
// Return the type of the capture object: CAP_
VF
W, etc...
virtual
int
getCaptureDomain
()
{
return
cv
::
CAP_ANY
;
}
// Return the type of the capture object: CAP_
DSHO
W, etc...
};
};
/*************************** CvVideoWriter structure ****************************/
/*************************** CvVideoWriter structure ****************************/
...
@@ -107,18 +107,12 @@ struct CvVideoWriter
...
@@ -107,18 +107,12 @@ struct CvVideoWriter
CvCapture
*
cvCreateCameraCapture_V4L
(
int
index
);
CvCapture
*
cvCreateCameraCapture_V4L
(
int
index
);
CvCapture
*
cvCreateCameraCapture_V4L
(
const
char
*
deviceName
);
CvCapture
*
cvCreateCameraCapture_V4L
(
const
char
*
deviceName
);
CvCapture
*
cvCreateCameraCapture_DC1394
(
int
index
);
CvCapture
*
cvCreateCameraCapture_DC1394_2
(
int
index
);
CvCapture
*
cvCreateCameraCapture_DC1394_2
(
int
index
);
CvCapture
*
cvCreateCameraCapture_MIL
(
int
index
);
CvCapture
*
cvCreateCameraCapture_MIL
(
int
index
);
CvCapture
*
cvCreateCameraCapture_Giganetix
(
int
index
);
CvCapture
*
cvCreateCameraCapture_Giganetix
(
int
index
);
CvCapture
*
cvCreateCameraCapture_CMU
(
int
index
);
CvCapture
*
cvCreateFileCapture_Win32
(
const
char
*
filename
);
CvCapture
*
cvCreateFileCapture_Win32
(
const
char
*
filename
);
CvCapture
*
cvCreateCameraCapture_VFW
(
int
index
);
CvCapture
*
cvCreateFileCapture_VFW
(
const
char
*
filename
);
CvVideoWriter
*
cvCreateVideoWriter_Win32
(
const
char
*
filename
,
int
fourcc
,
CvVideoWriter
*
cvCreateVideoWriter_Win32
(
const
char
*
filename
,
int
fourcc
,
double
fps
,
CvSize
frameSize
,
int
is_color
);
double
fps
,
CvSize
frameSize
,
int
is_color
);
CvVideoWriter
*
cvCreateVideoWriter_VFW
(
const
char
*
filename
,
int
fourcc
,
double
fps
,
CvSize
frameSize
,
int
is_color
);
CvCapture
*
cvCreateCameraCapture_DShow
(
int
index
);
CvCapture
*
cvCreateCameraCapture_DShow
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI2
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI2
(
int
index
);
...
@@ -150,7 +144,6 @@ CvVideoWriter* cvCreateVideoWriter_AVFoundation( const char* filename, int fourc
...
@@ -150,7 +144,6 @@ CvVideoWriter* cvCreateVideoWriter_AVFoundation( const char* filename, int fourc
double
fps
,
CvSize
frameSize
,
int
is_color
);
double
fps
,
CvSize
frameSize
,
int
is_color
);
CvCapture
*
cvCreateCameraCapture_Unicap
(
const
int
index
);
CvCapture
*
cvCreateCameraCapture_PvAPI
(
const
int
index
);
CvCapture
*
cvCreateCameraCapture_PvAPI
(
const
int
index
);
CvVideoWriter
*
cvCreateVideoWriter_GStreamer
(
const
char
*
filename
,
int
fourcc
,
CvVideoWriter
*
cvCreateVideoWriter_GStreamer
(
const
char
*
filename
,
int
fourcc
,
double
fps
,
CvSize
frameSize
,
int
is_color
);
double
fps
,
CvSize
frameSize
,
int
is_color
);
...
@@ -167,7 +160,7 @@ namespace cv
...
@@ -167,7 +160,7 @@ namespace cv
virtual
bool
grabFrame
()
=
0
;
virtual
bool
grabFrame
()
=
0
;
virtual
bool
retrieveFrame
(
int
,
OutputArray
)
=
0
;
virtual
bool
retrieveFrame
(
int
,
OutputArray
)
=
0
;
virtual
bool
isOpened
()
const
=
0
;
virtual
bool
isOpened
()
const
=
0
;
virtual
int
getCaptureDomain
()
{
return
CAP_ANY
;
}
// Return the type of the capture object: CAP_
VF
W, etc...
virtual
int
getCaptureDomain
()
{
return
CAP_ANY
;
}
// Return the type of the capture object: CAP_
DSHO
W, etc...
};
};
class
IVideoWriter
class
IVideoWriter
...
...
modules/videoio/src/videoio_registry.cpp
View file @
ebc80156
...
@@ -44,10 +44,10 @@ namespace {
...
@@ -44,10 +44,10 @@ namespace {
/** Ordering guidelines:
/** Ordering guidelines:
- modern optimized, multi-platform libraries: ffmpeg, gstreamer, Media SDK
- modern optimized, multi-platform libraries: ffmpeg, gstreamer, Media SDK
- platform specific universal SDK: WINRT,
QTKIT/AVFOUNDATION, MSMF/VFW
/DSHOW, V4L/V4L2
- platform specific universal SDK: WINRT,
AVFOUNDATION, MSMF
/DSHOW, V4L/V4L2
- RGB-D: OpenNI/OpenNI2, INTELPERC/REALSENSE
- RGB-D: OpenNI/OpenNI2, INTELPERC/REALSENSE
- special OpenCV (file-based): "images", "mjpeg"
- special OpenCV (file-based): "images", "mjpeg"
- special camera SDKs, including stereo: other special SDKs: FIREWIRE/1394, XIMEA/ARAVIS/GIGANETIX/PVAPI(GigE)
, UNICAP
- special camera SDKs, including stereo: other special SDKs: FIREWIRE/1394, XIMEA/ARAVIS/GIGANETIX/PVAPI(GigE)
- other: XINE, gphoto2, etc
- other: XINE, gphoto2, etc
*/
*/
static
const
struct
VideoBackendInfo
builtin_backends
[]
=
static
const
struct
VideoBackendInfo
builtin_backends
[]
=
...
@@ -64,9 +64,6 @@ static const struct VideoBackendInfo builtin_backends[] =
...
@@ -64,9 +64,6 @@ static const struct VideoBackendInfo builtin_backends[] =
// Apple platform
// Apple platform
#if defined(HAVE_QUICKTIME) || defined(HAVE_QTKIT)
DECLARE_BACKEND
(
CAP_QT
,
"QUICKTIME"
,
MODE_CAPTURE_ALL
|
MODE_WRITER
),
#endif
#ifdef HAVE_AVFOUNDATION
#ifdef HAVE_AVFOUNDATION
DECLARE_BACKEND
(
CAP_AVFOUNDATION
,
"AVFOUNDATION"
,
MODE_CAPTURE_ALL
|
MODE_WRITER
),
DECLARE_BACKEND
(
CAP_AVFOUNDATION
,
"AVFOUNDATION"
,
MODE_CAPTURE_ALL
|
MODE_WRITER
),
#endif
#endif
...
@@ -81,9 +78,6 @@ static const struct VideoBackendInfo builtin_backends[] =
...
@@ -81,9 +78,6 @@ static const struct VideoBackendInfo builtin_backends[] =
#ifdef HAVE_DSHOW
#ifdef HAVE_DSHOW
DECLARE_BACKEND
(
CAP_DSHOW
,
"DSHOW"
,
MODE_CAPTURE_BY_INDEX
),
DECLARE_BACKEND
(
CAP_DSHOW
,
"DSHOW"
,
MODE_CAPTURE_BY_INDEX
),
#endif
#endif
#ifdef HAVE_VFW
DECLARE_BACKEND
(
CAP_VFW
,
"VFW"
,
MODE_CAPTURE_ALL
|
MODE_WRITER
),
#endif
// Linux, some Unix
// Linux, some Unix
#if defined HAVE_CAMV4L2
#if defined HAVE_CAMV4L2
...
@@ -111,7 +105,7 @@ static const struct VideoBackendInfo builtin_backends[] =
...
@@ -111,7 +105,7 @@ static const struct VideoBackendInfo builtin_backends[] =
DECLARE_BACKEND
(
CAP_OPENCV_MJPEG
,
"CV_MJPEG"
,
MODE_CAPTURE_BY_FILENAME
|
MODE_WRITER
),
DECLARE_BACKEND
(
CAP_OPENCV_MJPEG
,
"CV_MJPEG"
,
MODE_CAPTURE_BY_FILENAME
|
MODE_WRITER
),
// special interfaces / stereo cameras / other SDKs
// special interfaces / stereo cameras / other SDKs
#if defined(HAVE_DC1394_2)
|| defined(HAVE_DC1394) || defined(HAVE_CMU1394)
#if defined(HAVE_DC1394_2)
DECLARE_BACKEND
(
CAP_FIREWIRE
,
"FIREWIRE"
,
MODE_CAPTURE_BY_INDEX
),
DECLARE_BACKEND
(
CAP_FIREWIRE
,
"FIREWIRE"
,
MODE_CAPTURE_BY_INDEX
),
#endif
#endif
// GigE
// GigE
...
@@ -127,9 +121,6 @@ static const struct VideoBackendInfo builtin_backends[] =
...
@@ -127,9 +121,6 @@ static const struct VideoBackendInfo builtin_backends[] =
#ifdef HAVE_ARAVIS_API
#ifdef HAVE_ARAVIS_API
DECLARE_BACKEND
(
CAP_ARAVIS
,
"ARAVIS"
,
MODE_CAPTURE_BY_INDEX
),
DECLARE_BACKEND
(
CAP_ARAVIS
,
"ARAVIS"
,
MODE_CAPTURE_BY_INDEX
),
#endif
#endif
#ifdef HAVE_UNICAP
DECLARE_BACKEND
(
CAP_UNICAP
,
"UNICAP"
,
MODE_CAPTURE_BY_INDEX
),
#endif
#ifdef HAVE_GPHOTO2
#ifdef HAVE_GPHOTO2
DECLARE_BACKEND
(
CAP_GPHOTO2
,
"GPHOTO2"
,
MODE_CAPTURE_ALL
),
DECLARE_BACKEND
(
CAP_GPHOTO2
,
"GPHOTO2"
,
MODE_CAPTURE_ALL
),
...
@@ -443,23 +434,9 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
...
@@ -443,23 +434,9 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
TRY_OPEN
(
createGPhoto2Capture
(
index
));
TRY_OPEN
(
createGPhoto2Capture
(
index
));
break
;
break
;
#endif
#endif
case
CAP_VFW
:
// or CAP_V4L or CAP_V4L2
#ifdef HAVE_VFW
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_VFW
(
index
))
#endif
#if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_V4L
(
index
))
#endif
break
;
case
CAP_FIREWIRE
:
case
CAP_FIREWIRE
:
#ifdef HAVE_DC1394_2
#ifdef HAVE_DC1394_2
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_DC1394_2
(
index
))
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_DC1394_2
(
index
))
#endif
#ifdef HAVE_DC1394
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_DC1394
(
index
))
#endif
#ifdef HAVE_CMU1394
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_CMU
(
index
))
#endif
#endif
break
;
// CAP_FIREWIRE
break
;
// CAP_FIREWIRE
#ifdef HAVE_MIL
#ifdef HAVE_MIL
...
@@ -467,16 +444,6 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
...
@@ -467,16 +444,6 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_MIL
(
index
))
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_MIL
(
index
))
break
;
break
;
#endif
#endif
#if defined(HAVE_QUICKTIME) || defined(HAVE_QTKIT)
case
CAP_QT
:
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_QT
(
index
))
break
;
#endif
#ifdef HAVE_UNICAP
case
CAP_UNICAP
:
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_Unicap
(
index
))
break
;
#endif
#ifdef HAVE_PVAPI
#ifdef HAVE_PVAPI
case
CAP_PVAPI
:
case
CAP_PVAPI
:
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_PvAPI
(
index
))
TRY_OPEN_LEGACY
(
cvCreateCameraCapture_PvAPI
(
index
))
...
@@ -531,18 +498,6 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
...
@@ -531,18 +498,6 @@ void VideoCapture_create(CvCapture*& capture, Ptr<IVideoCapture>& icap, VideoCap
break
;
break
;
#endif
#endif
#ifdef HAVE_VFW
case
CAP_VFW
:
TRY_OPEN_LEGACY
(
cvCreateFileCapture_VFW
(
filename
.
c_str
()))
break
;
#endif
#if defined(HAVE_QUICKTIME) || defined(HAVE_QTKIT)
case
CAP_QT
:
TRY_OPEN_LEGACY
(
cvCreateFileCapture_QT
(
filename
.
c_str
()))
break
;
#endif
#ifdef HAVE_AVFOUNDATION
#ifdef HAVE_AVFOUNDATION
case
CAP_AVFOUNDATION
:
case
CAP_AVFOUNDATION
:
TRY_OPEN_LEGACY
(
cvCreateFileCapture_AVFoundation
(
filename
.
c_str
()))
TRY_OPEN_LEGACY
(
cvCreateFileCapture_AVFoundation
(
filename
.
c_str
()))
...
@@ -664,21 +619,11 @@ void VideoWriter_create(CvVideoWriter*& writer, Ptr<IVideoWriter>& iwriter, Vide
...
@@ -664,21 +619,11 @@ void VideoWriter_create(CvVideoWriter*& writer, Ptr<IVideoWriter>& iwriter, Vide
CREATE_WRITER
(
VideoWriter_IntelMFX
::
create
(
filename
,
fourcc
,
fps
,
frameSize
,
isColor
));
CREATE_WRITER
(
VideoWriter_IntelMFX
::
create
(
filename
,
fourcc
,
fps
,
frameSize
,
isColor
));
break
;
break
;
#endif
#endif
#ifdef HAVE_VFW
case
CAP_VFW
:
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_VFW
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
break
;
#endif
#ifdef HAVE_AVFOUNDATION
#ifdef HAVE_AVFOUNDATION
case
CAP_AVFOUNDATION
:
case
CAP_AVFOUNDATION
:
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_AVFoundation
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_AVFoundation
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
break
;
break
;
#endif
#endif
#if defined(HAVE_QUICKTIME) || defined(HAVE_QTKIT)
case
(
CAP_QT
):
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_QT
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
break
;
#endif
#ifdef HAVE_GSTREAMER
#ifdef HAVE_GSTREAMER
case
CAP_GSTREAMER
:
case
CAP_GSTREAMER
:
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_GStreamer
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
CREATE_WRITER_LEGACY
(
cvCreateVideoWriter_GStreamer
(
filename
.
c_str
(),
fourcc
,
fps
,
cvSize
(
frameSize
),
isColor
))
...
...
modules/videoio/test/test_video_io.cpp
View file @
ebc80156
...
@@ -316,11 +316,6 @@ static const VideoCaptureAPIs backend_params[] = {
...
@@ -316,11 +316,6 @@ static const VideoCaptureAPIs backend_params[] = {
CAP_MSMF
,
CAP_MSMF
,
#endif
#endif
// TODO: Broken?
//#ifdef HAVE_VFW
// CAP_VFW,
//#endif
#ifdef HAVE_GSTREAMER
#ifdef HAVE_GSTREAMER
CAP_GSTREAMER
,
CAP_GSTREAMER
,
#endif
#endif
...
@@ -389,18 +384,6 @@ static Ext_Fourcc_PSNR synthetic_params[] = {
...
@@ -389,18 +384,6 @@ static Ext_Fourcc_PSNR synthetic_params[] = {
makeParam
(
"mov"
,
"H264"
,
30.
f
,
CAP_MSMF
),
makeParam
(
"mov"
,
"H264"
,
30.
f
,
CAP_MSMF
),
#endif
#endif
// TODO: Broken?
//#ifdef HAVE_VFW
//#if !defined(_M_ARM)
// makeParam("wmv", "WMV1", 30.f, CAP_VFW),
// makeParam("wmv", "WMV2", 30.f, CAP_VFW),
//#endif
// makeParam("wmv", "WMV3", 30.f, CAP_VFW),
// makeParam("wmv", "WVC1", 30.f, CAP_VFW),
// makeParam("avi", "H264", 30.f, CAP_VFW),
// makeParam("avi", "MJPG", 30.f, CAP_VFW),
//#endif
#ifdef HAVE_QUICKTIME
#ifdef HAVE_QUICKTIME
makeParam
(
"mov"
,
"mp4v"
,
30.
f
,
CAP_QT
),
makeParam
(
"mov"
,
"mp4v"
,
30.
f
,
CAP_QT
),
makeParam
(
"avi"
,
"XVID"
,
30.
f
,
CAP_QT
),
makeParam
(
"avi"
,
"XVID"
,
30.
f
,
CAP_QT
),
...
...
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