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
a0e46003
Commit
a0e46003
authored
Aug 26, 2014
by
PhilLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VideoCapture did not detect an unopened camera
parent
4b84d5d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
cap.cpp
modules/videoio/src/cap.cpp
+4
-4
cap_dshow.cpp
modules/videoio/src/cap_dshow.cpp
+1
-1
No files found.
modules/videoio/src/cap.cpp
View file @
a0e46003
...
...
@@ -621,15 +621,15 @@ Ptr<IVideoCapture> VideoCapture::createCameraCapture(int index)
{
#ifdef HAVE_DSHOW
case
CV_CAP_DSHOW
:
capture
=
Ptr
<
IVideoCapture
>
(
new
cv
::
VideoCapture_DShow
(
index
)
);
if
(
capture
)
capture
=
makePtr
<
VideoCapture_DShow
>
(
index
);
if
(
capture
&&
capture
.
dynamicCast
<
VideoCapture_DShow
>
()
->
isOpened
()
)
return
capture
;
break
;
// CV_CAP_DSHOW
#endif
#ifdef HAVE_INTELPERC
case
CV_CAP_INTELPERC
:
capture
=
Ptr
<
IVideoCapture
>
(
new
cv
::
VideoCapture_IntelPerC
()
);
if
(
capture
)
capture
=
makePtr
<
VideoCapture_IntelPerC
>
(
);
if
(
capture
&&
capture
.
dynamicCast
<
VideoCapture_IntelPerC
>
()
->
isOpened
()
)
return
capture
;
break
;
// CV_CAP_INTEL_PERC
#endif
...
...
modules/videoio/src/cap_dshow.cpp
View file @
a0e46003
...
...
@@ -1590,7 +1590,7 @@ bool videoInput::isFrameNew(int id){
bool
videoInput
::
isDeviceSetup
(
int
id
){
if
(
id
<
devicesFound
&&
VDList
[
id
]
->
readyToCapture
)
return
true
;
if
(
id
>=
0
&&
id
<
devicesFound
&&
VDList
[
id
]
->
readyToCapture
)
return
true
;
else
return
false
;
}
...
...
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