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
0d249c74
Commit
0d249c74
authored
Jun 09, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videoio(msmf): replace custom debug print function
parent
93f2fd39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
40 deletions
+8
-40
cap_msmf.cpp
modules/videoio/src/cap_msmf.cpp
+8
-40
No files found.
modules/videoio/src/cap_msmf.cpp
View file @
0d249c74
...
...
@@ -101,38 +101,6 @@ struct IMFAttributes;
namespace
{
#ifdef _DEBUG
void
DPOprintOut
(
const
wchar_t
*
format
,
...)
{
int
i
=
0
;
wchar_t
*
p
=
NULL
;
va_list
args
;
va_start
(
args
,
format
);
if
(
::
IsDebuggerPresent
())
{
WCHAR
szMsg
[
512
];
::
StringCchVPrintfW
(
szMsg
,
sizeof
(
szMsg
)
/
sizeof
(
szMsg
[
0
]),
format
,
args
);
::
OutputDebugStringW
(
szMsg
);
}
else
{
if
(
wcscmp
(
format
,
L"%i"
))
{
i
=
va_arg
(
args
,
int
);
}
if
(
wcscmp
(
format
,
L"%s"
))
{
p
=
va_arg
(
args
,
wchar_t
*
);
}
wprintf
(
format
,
i
,
p
);
}
va_end
(
args
);
}
#define DebugPrintOut(...) DPOprintOut(__VA_ARGS__)
#else
#define DebugPrintOut(...) void()
#endif
template
<
class
T
>
class
ComPtr
{
...
...
@@ -1074,7 +1042,7 @@ bool CvCapture_MSMF::grabFrame()
break
;
if
(
flags
&
MF_SOURCE_READERF_STREAMTICK
)
{
DebugPrintOut
(
L"
\t
Stream tick detected. Retrying to grab the frame
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Stream tick detected. Retrying to grab the frame
"
);
}
}
...
...
@@ -1082,38 +1050,38 @@ bool CvCapture_MSMF::grabFrame()
{
if
(
streamIndex
!=
dwStreamIndex
)
{
DebugPrintOut
(
L"
\t
Wrong stream readed. Abort capturing
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Wrong stream readed. Abort capturing
"
);
close
();
}
else
if
(
flags
&
MF_SOURCE_READERF_ERROR
)
{
DebugPrintOut
(
L"
\t
Stream reading error. Abort capturing
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Stream reading error. Abort capturing
"
);
close
();
}
else
if
(
flags
&
MF_SOURCE_READERF_ALLEFFECTSREMOVED
)
{
DebugPrintOut
(
L"
\t
Stream decoding error. Abort capturing
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Stream decoding error. Abort capturing
"
);
close
();
}
else
if
(
flags
&
MF_SOURCE_READERF_ENDOFSTREAM
)
{
sampleTime
+=
frameStep
;
DebugPrintOut
(
L"
\t
End of stream detected
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): End of stream detected
"
);
}
else
{
sampleTime
+=
frameStep
;
if
(
flags
&
MF_SOURCE_READERF_NEWSTREAM
)
{
DebugPrintOut
(
L"
\t
New stream detected
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): New stream detected
"
);
}
if
(
flags
&
MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED
)
{
DebugPrintOut
(
L"
\t
Stream native media type changed
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Stream native media type changed
"
);
}
if
(
flags
&
MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED
)
{
DebugPrintOut
(
L"
\t
Stream current media type changed
\n
"
);
CV_LOG_DEBUG
(
NULL
,
"videoio(MSMF): Stream current media type changed
"
);
}
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