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
4703f455
Commit
4703f455
authored
Apr 03, 2013
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental MS Media Foundation API support added
parent
c6cab50c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
17 deletions
+53
-17
CMakeLists.txt
CMakeLists.txt
+9
-4
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+9
-4
cvconfig.h.cmake
cmake/templates/cvconfig.h.cmake
+5
-2
CMakeLists.txt
modules/highgui/CMakeLists.txt
+13
-1
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+1
-0
cap.cpp
modules/highgui/src/cap.cpp
+11
-3
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+2
-1
cap_msmf.cpp
modules/highgui/src/cap_msmf.cpp
+0
-0
precomp.hpp
modules/highgui/src/precomp.hpp
+1
-0
test_precomp.hpp
modules/highgui/test/test_precomp.hpp
+2
-2
No files found.
CMakeLists.txt
View file @
4703f455
...
@@ -140,7 +140,8 @@ OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF
...
@@ -140,7 +140,8 @@ OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF
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_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
)
)
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 AND NOT ARM
)
OCV_OPTION
(
WITH_DSHOW
"Build HighGUI with DirectShow support"
ON
IF
(
WIN32 AND NOT ARM
)
)
OCV_OPTION
(
WITH_MSMF
"Build HighGUI with Media Foundation support"
OFF
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF
IF
(
NOT ANDROID AND NOT APPLE
)
)
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
)
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_OPENCL
"Include OpenCL Runtime support"
OFF
IF
(
NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_OPENCL
"Include OpenCL Runtime support"
OFF
IF
(
NOT ANDROID AND NOT IOS
)
)
...
@@ -753,9 +754,13 @@ if(DEFINED WITH_V4L)
...
@@ -753,9 +754,13 @@ if(DEFINED WITH_V4L)
ELSE
"
${
HAVE_CAMV4L_STR
}
/
${
HAVE_CAMV4L2_STR
}
"
)
ELSE
"
${
HAVE_CAMV4L_STR
}
/
${
HAVE_CAMV4L2_STR
}
"
)
endif
(
DEFINED WITH_V4L
)
endif
(
DEFINED WITH_V4L
)
if
(
DEFINED WITH_VIDEOINPUT
)
if
(
DEFINED WITH_DSHOW
)
status
(
" DirectShow:"
HAVE_VIDEOINPUT THEN YES ELSE NO
)
status
(
" DirectShow:"
HAVE_DSHOW THEN YES ELSE NO
)
endif
(
DEFINED WITH_VIDEOINPUT
)
endif
(
DEFINED WITH_DSHOW
)
if
(
DEFINED WITH_MSMF
)
status
(
" Media Foundation:"
HAVE_MSMF THEN YES ELSE NO
)
endif
(
DEFINED WITH_MSMF
)
if
(
DEFINED WITH_XIMEA
)
if
(
DEFINED WITH_XIMEA
)
status
(
" XIMEA:"
HAVE_XIMEA THEN YES ELSE NO
)
status
(
" XIMEA:"
HAVE_XIMEA THEN YES ELSE NO
)
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
4703f455
...
@@ -184,11 +184,16 @@ if(WITH_FFMPEG)
...
@@ -184,11 +184,16 @@ if(WITH_FFMPEG)
endif
(
APPLE
)
endif
(
APPLE
)
endif
(
WITH_FFMPEG
)
endif
(
WITH_FFMPEG
)
# --- VideoInput ---
# --- VideoInput
/DirectShow
---
if
(
WITH_
VIDEOINPUT
)
if
(
WITH_
DSHOW
)
# always have VideoInput on Windows
# always have VideoInput on Windows
set
(
HAVE_VIDEOINPUT 1
)
set
(
HAVE_DSHOW 1
)
endif
(
WITH_VIDEOINPUT
)
endif
(
WITH_DSHOW
)
# --- VideoInput/Microsoft Media Foundation ---
if
(
WITH_MSMF
)
check_include_file
(
Mfapi.h HAVE_MSMF
)
endif
(
WITH_MSMF
)
# --- Extra HighGUI libs on Windows ---
# --- Extra HighGUI libs on Windows ---
if
(
WIN32
)
if
(
WIN32
)
...
...
cmake/templates/cvconfig.h.cmake
View file @
4703f455
...
@@ -214,8 +214,11 @@
...
@@ -214,8 +214,11 @@
/* AMD's Basic Linear Algebra Subprograms Library*/
/* AMD's Basic Linear Algebra Subprograms Library*/
#cmakedefine HAVE_CLAMDBLAS
#cmakedefine HAVE_CLAMDBLAS
/* VideoInput library */
/* DirectShow Video Capture library */
#cmakedefine HAVE_VIDEOINPUT
#cmakedefine HAVE_DSHOW
/* Microsoft Media Foundation Capture library */
#cmakedefine HAVE_MSMF
/* XIMEA camera support */
/* XIMEA camera support */
#cmakedefine HAVE_XIMEA
#cmakedefine HAVE_XIMEA
...
...
modules/highgui/CMakeLists.txt
View file @
4703f455
...
@@ -106,7 +106,19 @@ elseif(APPLE)
...
@@ -106,7 +106,19 @@ elseif(APPLE)
endif
()
endif
()
if
(
WIN32 AND NOT ARM
)
if
(
WIN32 AND NOT ARM
)
list
(
APPEND highgui_srcs src/cap_dshow.cpp src/cap_vfw.cpp src/cap_cmu.cpp
)
list
(
APPEND highgui_srcs src/cap_cmu.cpp
)
endif
()
if
(
WIN32 AND HAVE_DSHOW
)
list
(
APPEND highgui_srcs src/cap_dshow.cpp
)
endif
()
if
(
WIN32 AND HAVE_MSMF
)
list
(
APPEND highgui_srcs src/cap_msmf.cpp
)
endif
()
if
(
WIN32 AND HAVE_VFW
)
list
(
APPEND highgui_srcs src/cap_vfw.cpp
)
endif
()
endif
()
if
(
HAVE_XINE
)
if
(
HAVE_XINE
)
...
...
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
4703f455
...
@@ -297,6 +297,7 @@ enum
...
@@ -297,6 +297,7 @@ enum
CV_CAP_UNICAP
=
600
,
// Unicap drivers
CV_CAP_UNICAP
=
600
,
// Unicap drivers
CV_CAP_DSHOW
=
700
,
// DirectShow (via videoInput)
CV_CAP_DSHOW
=
700
,
// DirectShow (via videoInput)
CV_CAP_MSMF
=
1400
,
// Microsoft Media Foundation (via videoInput)
CV_CAP_PVAPI
=
800
,
// PvAPI, Prosilica GigE SDK
CV_CAP_PVAPI
=
800
,
// PvAPI, Prosilica GigE SDK
...
...
modules/highgui/src/cap.cpp
View file @
4703f455
...
@@ -114,7 +114,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
...
@@ -114,7 +114,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
{
{
int
domains
[]
=
int
domains
[]
=
{
{
#ifdef HAVE_
VIDEOINPUT
#ifdef HAVE_
DSHOW
CV_CAP_DSHOW
,
CV_CAP_DSHOW
,
#endif
#endif
#if 1
#if 1
...
@@ -168,7 +168,8 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
...
@@ -168,7 +168,8 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
// try every possibly installed camera API
// try every possibly installed camera API
for
(
int
i
=
0
;
domains
[
i
]
>=
0
;
i
++
)
for
(
int
i
=
0
;
domains
[
i
]
>=
0
;
i
++
)
{
{
#if defined(HAVE_VIDEOINPUT) || \
#if defined(HAVE_DSHOW) || \
defined(HAVE_MSMF) || \
defined(HAVE_TYZX) || \
defined(HAVE_TYZX) || \
defined(HAVE_VFW) || \
defined(HAVE_VFW) || \
defined(HAVE_LIBV4L) || \
defined(HAVE_LIBV4L) || \
...
@@ -195,7 +196,14 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
...
@@ -195,7 +196,14 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
switch
(
domains
[
i
])
switch
(
domains
[
i
])
{
{
#ifdef HAVE_VIDEOINPUT
#ifdef HAVE_MSMF
case
CV_CAP_MSMF
:
capture
=
cvCreateCameraCapture_MSMF
(
index
);
if
(
capture
)
return
capture
;
break
;
#endif
#ifdef HAVE_DSHOW
case
CV_CAP_DSHOW
:
case
CV_CAP_DSHOW
:
capture
=
cvCreateCameraCapture_DShow
(
index
);
capture
=
cvCreateCameraCapture_DShow
(
index
);
if
(
capture
)
if
(
capture
)
...
...
modules/highgui/src/cap_dshow.cpp
View file @
4703f455
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#include "precomp.hpp"
#include "precomp.hpp"
#if (defined WIN32 || defined _WIN32) && defined HAVE_
VIDEOINPUT
#if (defined WIN32 || defined _WIN32) && defined HAVE_
DSHOW
/*
/*
DirectShow-based Video Capturing module is based on
DirectShow-based Video Capturing module is based on
...
@@ -3100,6 +3100,7 @@ HRESULT videoInput::routeCrossbar(ICaptureGraphBuilder2 **ppBuild, IBaseFilter *
...
@@ -3100,6 +3100,7 @@ HRESULT videoInput::routeCrossbar(ICaptureGraphBuilder2 **ppBuild, IBaseFilter *
return
hr
;
return
hr
;
}
}
/********************* Capturing video from camera via DirectShow *********************/
/********************* Capturing video from camera via DirectShow *********************/
class
CvCaptureCAM_DShow
:
public
CvCapture
class
CvCaptureCAM_DShow
:
public
CvCapture
...
...
modules/highgui/src/cap_msmf.cpp
0 → 100644
View file @
4703f455
This diff is collapsed.
Click to expand it.
modules/highgui/src/precomp.hpp
View file @
4703f455
...
@@ -118,6 +118,7 @@ CvVideoWriter* cvCreateVideoWriter_Win32( const char* filename, int fourcc,
...
@@ -118,6 +118,7 @@ CvVideoWriter* cvCreateVideoWriter_Win32( const char* filename, int fourcc,
CvVideoWriter
*
cvCreateVideoWriter_VFW
(
const
char
*
filename
,
int
fourcc
,
CvVideoWriter
*
cvCreateVideoWriter_VFW
(
const
char
*
filename
,
int
fourcc
,
double
fps
,
CvSize
frameSize
,
int
is_color
);
double
fps
,
CvSize
frameSize
,
int
is_color
);
CvCapture
*
cvCreateCameraCapture_DShow
(
int
index
);
CvCapture
*
cvCreateCameraCapture_DShow
(
int
index
);
CvCapture
*
cvCreateCameraCapture_MSMF
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI
(
int
index
);
CvCapture
*
cvCreateCameraCapture_OpenNI
(
int
index
);
CvCapture
*
cvCreateFileCapture_OpenNI
(
const
char
*
filename
);
CvCapture
*
cvCreateFileCapture_OpenNI
(
const
char
*
filename
);
CvCapture
*
cvCreateCameraCapture_Android
(
int
index
);
CvCapture
*
cvCreateCameraCapture_Android
(
int
index
);
...
...
modules/highgui/test/test_precomp.hpp
View file @
4703f455
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#include <iostream>
#include <iostream>
#if defined(HAVE_
VIDEOINPUT)
|| \
#if defined(HAVE_
DSHOW)
|| \
defined(HAVE_TYZX) || \
defined(HAVE_TYZX) || \
defined(HAVE_VFW) || \
defined(HAVE_VFW) || \
defined(HAVE_LIBV4L) || \
defined(HAVE_LIBV4L) || \
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
defined(HAVE_OPENNI) || \
defined(HAVE_OPENNI) || \
defined(HAVE_XIMEA) || \
defined(HAVE_XIMEA) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_GIGE_API) || \
defined(HAVE_GIGE_API)
|| \
(0)
(0)
//defined(HAVE_ANDROID_NATIVE_CAMERA) || - enable after #1193
//defined(HAVE_ANDROID_NATIVE_CAMERA) || - enable after #1193
# define BUILD_WITH_CAMERA_SUPPORT 1
# define BUILD_WITH_CAMERA_SUPPORT 1
...
...
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