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
c977af8e
Commit
c977af8e
authored
Dec 14, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7843 from chacha21:fix-capture-msmf
parents
a24ebc99
166d75e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
cap_msmf.cpp
modules/videoio/src/cap_msmf.cpp
+23
-9
No files found.
modules/videoio/src/cap_msmf.cpp
View file @
c977af8e
...
...
@@ -1986,13 +1986,17 @@ long videoDevice::resetDevice(IMFActivate *pActivate)
&
vd_pFriendlyName
,
NULL
);
hr
=
pActivate
->
ActivateObject
(
__uuidof
(
IMFMediaSource
),
(
void
**
)
&
pSource
);
enumerateCaptureFormats
(
pSource
);
buildLibraryofTypes
();
SafeRelease
(
&
pSource
);
if
(
SUCCEEDED
(
hr
))
hr
=
pActivate
->
ActivateObject
(
__uuidof
(
IMFMediaSource
),
(
void
**
)
&
pSource
);
if
(
SUCCEEDED
(
hr
)
&&
pSource
)
{
enumerateCaptureFormats
(
pSource
);
buildLibraryofTypes
();
SafeRelease
(
&
pSource
);
}
//end if (SUCCEEDED(hr) && pSource)
if
(
FAILED
(
hr
))
{
vd_pFriendlyName
=
NULL
;
...
...
@@ -2638,7 +2642,12 @@ HRESULT videoDevice::enumerateCaptureFormats(IMFMediaSource *pSource)
_ComPtr
<
IMFStreamDescriptor
>
pSD
=
NULL
;
_ComPtr
<
IMFMediaTypeHandler
>
pHandler
=
NULL
;
_ComPtr
<
IMFMediaType
>
pType
=
NULL
;
HRESULT
hr
=
pSource
->
CreatePresentationDescriptor
(
pPD
.
GetAddressOf
());
HRESULT
hr
=
!
pSource
?
E_POINTER
:
S_OK
;
if
(
FAILED
(
hr
))
{
goto
done
;
}
hr
=
pSource
->
CreatePresentationDescriptor
(
pPD
.
GetAddressOf
());
if
(
FAILED
(
hr
))
{
goto
done
;
...
...
@@ -3815,7 +3824,12 @@ HRESULT CvCaptureFile_MSMF::enumerateCaptureFormats(IMFMediaSource *pSource)
_ComPtr
<
IMFStreamDescriptor
>
pSD
=
NULL
;
_ComPtr
<
IMFMediaTypeHandler
>
pHandler
=
NULL
;
_ComPtr
<
IMFMediaType
>
pType
=
NULL
;
HRESULT
hr
=
pSource
->
CreatePresentationDescriptor
(
pPD
.
GetAddressOf
());
HRESULT
hr
=
!
pSource
?
E_POINTER
:
S_OK
;
if
(
FAILED
(
hr
))
{
goto
done
;
}
hr
=
pSource
->
CreatePresentationDescriptor
(
pPD
.
GetAddressOf
());
if
(
FAILED
(
hr
))
{
goto
done
;
...
...
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