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
59c182ed
Commit
59c182ed
authored
Oct 02, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15467 from elmsfu:dshow/add_save_graph_file
parents
c06115cb
8b483a91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
cap_dshow.cpp
modules/videoio/src/cap_dshow.cpp
+16
-0
No files found.
modules/videoio/src/cap_dshow.cpp
View file @
59c182ed
...
...
@@ -2936,6 +2936,22 @@ int videoInput::start(int deviceID, videoDevice *VD){
DebugPrintOut
(
"SETUP: Device is setup and ready to capture.
\n\n
"
);
VD
->
readyToCapture
=
true
;
// check for optional saving the direct show graph to a file
const
char
*
graph_filename
=
getenv
(
"OPENCV_DSHOW_SAVEGRAPH_FILENAME"
);
if
(
graph_filename
)
{
size_t
filename_len
=
strlen
(
graph_filename
);
std
::
vector
<
WCHAR
>
wfilename
(
filename_len
+
1
);
size_t
len
=
mbstowcs
(
&
wfilename
[
0
],
graph_filename
,
filename_len
+
1
);
CV_Assert
(
len
==
filename_len
);
HRESULT
res
=
SaveGraphFile
(
VD
->
pGraph
,
&
wfilename
[
0
]);
if
(
SUCCEEDED
(
res
))
{
DebugPrintOut
(
"Saved DSHOW graph to %s
\n
"
,
graph_filename
);
}
else
{
DebugPrintOut
(
"Failed to save DSHOW graph to %s
\n
"
,
graph_filename
);
}
}
//Release filters - seen someone else do this
//looks like it solved the freezes
...
...
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