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
37460acb
Commit
37460acb
authored
Feb 04, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Feb 04, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #410 from taka-no-me:fix_cap_dshow_setfps
parents
e2536f1c
0cd8684a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+17
-5
No files found.
modules/highgui/src/cap_dshow.cpp
View file @
37460acb
...
...
@@ -3120,6 +3120,7 @@ protected:
void
init
();
int
index
,
width
,
height
,
fourcc
;
int
widthSet
,
heightSet
;
IplImage
*
frame
;
static
videoInput
VI
;
};
...
...
@@ -3138,6 +3139,7 @@ CvCaptureCAM_DShow::CvCaptureCAM_DShow()
index
=
-
1
;
frame
=
0
;
width
=
height
=
fourcc
=
-
1
;
widthSet
=
heightSet
=
-
1
;
CoInitialize
(
0
);
}
...
...
@@ -3155,7 +3157,7 @@ void CvCaptureCAM_DShow::close()
index
=
-
1
;
cvReleaseImage
(
&
frame
);
}
width
=
height
=
-
1
;
width
Set
=
heightSet
=
width
=
height
=
-
1
;
}
// Initialize camera input
...
...
@@ -3282,9 +3284,12 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
{
VI
.
stopDevice
(
index
);
VI
.
setIdealFramerate
(
index
,
fps
);
VI
.
setupDevice
(
index
);
if
(
widthSet
>
0
&&
heightSet
>
0
)
VI
.
setupDevice
(
index
,
widthSet
,
heightSet
);
else
VI
.
setupDevice
(
index
);
}
break
;
return
VI
.
isDeviceSetup
(
index
)
;
}
...
...
@@ -3299,8 +3304,15 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
VI
.
setIdealFramerate
(
index
,
fps
);
VI
.
setupDeviceFourcc
(
index
,
width
,
height
,
fourcc
);
}
width
=
height
=
fourcc
=
-
1
;
return
VI
.
isDeviceSetup
(
index
);
bool
success
=
VI
.
isDeviceSetup
(
index
);
if
(
success
)
{
widthSet
=
width
;
heightSet
=
height
;
width
=
height
=
fourcc
=
-
1
;
}
return
success
;
}
return
true
;
}
...
...
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