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
f773cd9a
Commit
f773cd9a
authored
Jul 14, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2947 from vbystricky:capDShow
parents
381986d0
7fe7facf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
15 deletions
+64
-15
cap.cpp
modules/highgui/src/cap.cpp
+15
-15
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+0
-0
cap_dshow.hpp
modules/highgui/src/cap_dshow.hpp
+49
-0
No files found.
modules/highgui/src/cap.cpp
View file @
f773cd9a
...
...
@@ -41,6 +41,7 @@
#include "precomp.hpp"
#include "cap_intelperc.hpp"
#include "cap_dshow.hpp"
#if defined _M_X64 && defined _MSC_VER && !defined CV_ICC
#pragma optimize("",off)
...
...
@@ -115,9 +116,6 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
{
int
domains
[]
=
{
#ifdef HAVE_DSHOW
CV_CAP_DSHOW
,
#endif
#ifdef HAVE_MSMF
CV_CAP_MSMF
,
#endif
...
...
@@ -175,8 +173,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
// try every possibly installed camera API
for
(
int
i
=
0
;
domains
[
i
]
>=
0
;
i
++
)
{
#if defined(HAVE_DSHOW) || \
defined(HAVE_MSMF) || \
#if defined(HAVE_MSMF) || \
defined(HAVE_TYZX) || \
defined(HAVE_VFW) || \
defined(HAVE_LIBV4L) || \
...
...
@@ -205,13 +202,6 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
switch
(
domains
[
i
])
{
#ifdef HAVE_DSHOW
case
CV_CAP_DSHOW
:
capture
=
cvCreateCameraCapture_DShow
(
index
);
if
(
capture
)
return
capture
;
break
;
#endif
#ifdef HAVE_MSMF
case
CV_CAP_MSMF
:
capture
=
cvCreateCameraCapture_MSMF
(
index
);
...
...
@@ -589,6 +579,9 @@ Ptr<IVideoCapture> VideoCapture::createCameraCapture(int index)
{
int
domains
[]
=
{
#ifdef HAVE_DSHOW
CV_CAP_DSHOW
,
#endif
#ifdef HAVE_INTELPERC
CV_CAP_INTELPERC
,
#endif
...
...
@@ -607,18 +600,26 @@ Ptr<IVideoCapture> VideoCapture::createCameraCapture(int index)
// try every possibly installed camera API
for
(
int
i
=
0
;
domains
[
i
]
>=
0
;
i
++
)
{
#if defined(HAVE_INTELPERC) || \
#if defined(HAVE_DSHOW) || \
defined(HAVE_INTELPERC) || \
(0)
Ptr
<
IVideoCapture
>
capture
;
switch
(
domains
[
i
])
{
#ifdef HAVE_DSHOW
case
CV_CAP_DSHOW
:
capture
=
Ptr
<
IVideoCapture
>
(
new
cv
::
VideoCapture_DShow
(
index
));
if
(
capture
)
return
capture
;
break
;
// CV_CAP_DSHOW
#endif
#ifdef HAVE_INTELPERC
case
CV_CAP_INTELPERC
:
capture
=
Ptr
<
IVideoCapture
>
(
new
cv
::
VideoCapture_IntelPerC
());
if
(
capture
)
return
capture
;
break
;
// CV_CAP_INTEL_PERC
break
;
// CV_CAP_INTEL_PERC
#endif
}
#endif
...
...
@@ -628,7 +629,6 @@ Ptr<IVideoCapture> VideoCapture::createCameraCapture(int index)
return
Ptr
<
IVideoCapture
>
();
}
VideoWriter
::
VideoWriter
()
{}
...
...
modules/highgui/src/cap_dshow.cpp
View file @
f773cd9a
This diff is collapsed.
Click to expand it.
modules/highgui/src/cap_dshow.hpp
0 → 100644
View file @
f773cd9a
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2014, Itseez, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
//M*/
#ifndef _CAP_DSHOW_HPP_
#define _CAP_DSHOW_HPP_
#include "precomp.hpp"
#ifdef HAVE_DSHOW
class
videoInput
;
namespace
cv
{
class
VideoCapture_DShow
:
public
IVideoCapture
{
public
:
VideoCapture_DShow
(
int
index
);
virtual
~
VideoCapture_DShow
();
virtual
double
getProperty
(
int
propIdx
);
virtual
bool
setProperty
(
int
propIdx
,
double
propVal
);
virtual
bool
grabFrame
();
virtual
bool
retrieveFrame
(
int
outputType
,
OutputArray
frame
);
virtual
int
getCaptureDomain
();
bool
isOpened
()
const
;
protected
:
void
open
(
int
index
);
void
close
();
int
m_index
,
m_width
,
m_height
,
m_fourcc
;
int
m_widthSet
,
m_heightSet
;
static
videoInput
g_VI
;
};
}
#endif //HAVE_DSHOW
#endif //_CAP_DSHOW_HPP_
\ No newline at end of file
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