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
d7ba03a9
Commit
d7ba03a9
authored
Oct 09, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3298 from a-wi:DShow_capture
parents
1e744bf5
5c960211
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+11
-1
No files found.
modules/highgui/src/cap_dshow.cpp
View file @
d7ba03a9
...
...
@@ -213,7 +213,7 @@ DEFINE_GUID(MEDIASUBTYPE_RGB24,0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf
DEFINE_GUID
(
MEDIASUBTYPE_RGB32
,
0xe436eb7e
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
MEDIASUBTYPE_RGB555
,
0xe436eb7c
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
MEDIASUBTYPE_RGB565
,
0xe436eb7b
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
MEDIASUBTYPE_I420
,
0x
49343230
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
MEDIASUBTYPE_I420
,
0x
30323449
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
MEDIASUBTYPE_UYVY
,
0x59565955
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
MEDIASUBTYPE_Y211
,
0x31313259
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
DEFINE_GUID
(
MEDIASUBTYPE_Y411
,
0x31313459
,
0x0000
,
0x0010
,
0x80
,
0x00
,
0x00
,
0xaa
,
0x00
,
0x38
,
0x9b
,
0x71
);
...
...
@@ -2427,7 +2427,15 @@ static bool setSizeAndSubtype(videoDevice * VD, int attemptWidth, int attemptHei
VD
->
pAmMediaType
->
subtype
=
mediatype
;
//buffer size
if
(
mediatype
==
MEDIASUBTYPE_RGB24
)
{
VD
->
pAmMediaType
->
lSampleSize
=
attemptWidth
*
attemptHeight
*
3
;
}
else
{
// For compressed data, the value can be zero.
VD
->
pAmMediaType
->
lSampleSize
=
0
;
}
//set fps if requested
if
(
VD
->
requestedFrameTime
!=
-
1
){
...
...
@@ -2570,6 +2578,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
if
(
setSizeAndSubtype
(
VD
,
VD
->
tryWidth
,
VD
->
tryHeight
,
VD
->
tryVideoType
)
){
VD
->
setSize
(
VD
->
tryWidth
,
VD
->
tryHeight
);
VD
->
videoType
=
VD
->
tryVideoType
;
foundSize
=
true
;
}
else
{
// try specified size with all formats
...
...
@@ -2580,6 +2589,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
if
(
verbose
)
printf
(
"SETUP: trying format %s @ %i by %i
\n
"
,
guidStr
,
VD
->
tryWidth
,
VD
->
tryHeight
);
if
(
setSizeAndSubtype
(
VD
,
VD
->
tryWidth
,
VD
->
tryHeight
,
mediaSubtypes
[
i
])
){
VD
->
setSize
(
VD
->
tryWidth
,
VD
->
tryHeight
);
VD
->
videoType
=
mediaSubtypes
[
i
];
foundSize
=
true
;
break
;
}
...
...
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