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
da884b4e
Commit
da884b4e
authored
Jan 29, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Jan 29, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #347 from asmorkalov:WITH_FFMPEG_logic
parents
e7cbf652
8c45b9d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
13 deletions
+39
-13
perf_input.cpp
modules/highgui/perf/perf_input.cpp
+4
-3
perf_output.cpp
modules/highgui/perf/perf_output.cpp
+4
-4
perf_precomp.hpp
modules/highgui/perf/perf_precomp.hpp
+25
-0
test_ffmpeg.cpp
modules/highgui/test/test_ffmpeg.cpp
+6
-6
No files found.
modules/highgui/perf/perf_input.cpp
View file @
da884b4e
#include "perf_precomp.hpp"
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
using
std
::
tr1
::
get
;
#ifndef ANDROID
typedef
perf
::
TestBaseWithParam
<
String
>
VideoCapture_Reading
;
...
...
@@ -26,4 +27,4 @@ PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_
SANITY_CHECK
(
dummy
);
}
#endif //ANDROID
\ No newline at end of file
#endif // BUILD_WITH_VIDEO_INPUT_SUPPORT
\ No newline at end of file
modules/highgui/perf/perf_output.cpp
View file @
da884b4e
#include "perf_precomp.hpp"
#if BUILD_WITH_VIDEO_OUTPUT_SUPPORT
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
using
std
::
tr1
::
get
;
#ifndef ANDROID
typedef
std
::
tr1
::
tuple
<
String
,
bool
>
VideoWriter_Writing_t
;
typedef
perf
::
TestBaseWithParam
<
VideoWriter_Writing_t
>
VideoWriter_Writing
;
...
...
@@ -31,4 +31,4 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
SANITY_CHECK
(
dummy
);
}
#endif //ANDROID
\ No newline at end of file
#endif // BUILD_WITH_VIDEO_OUTPUT_SUPPORT
\ No newline at end of file
modules/highgui/perf/perf_precomp.hpp
View file @
da884b4e
...
...
@@ -16,4 +16,29 @@
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#endif
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_AVFOUNDATION) || \
/*defined(HAVE_OPENNI) || too specialized */
\
defined(HAVE_FFMPEG) || \
defined(WIN32)
/* assume that we have ffmpeg */
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
#else
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
#endif
#if
/*defined(HAVE_XINE) || */
\
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(WIN32)
/* assume that we have ffmpeg */
# define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 1
#else
# define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 0
#endif
#endif
modules/highgui/test/test_ffmpeg.cpp
View file @
da884b4e
...
...
@@ -186,7 +186,7 @@ class CreateVideoWriterInvoker :
public
:
const
static
Size
FrameSize
;
static
std
::
string
TmpDirectory
;
CreateVideoWriterInvoker
(
std
::
vector
<
VideoWriter
*>&
_writers
,
std
::
vector
<
std
::
string
>&
_files
)
:
ParallelLoopBody
(),
writers
(
&
_writers
),
files
(
&
_files
)
{
...
...
@@ -221,7 +221,7 @@ class WriteVideo_Invoker :
{
public
:
enum
{
FrameCount
=
300
};
static
const
Scalar
ObjectColor
;
static
const
Point
Center
;
...
...
@@ -229,11 +229,11 @@ public:
ParallelLoopBody
(),
writers
(
&
_writers
)
{
}
static
void
GenerateFrame
(
Mat
&
frame
,
unsigned
int
i
)
{
frame
=
Scalar
::
all
(
i
%
255
);
std
::
string
text
=
to_string
(
i
);
putText
(
frame
,
text
,
Point
(
50
,
Center
.
y
),
FONT_HERSHEY_SIMPLEX
,
5.0
,
ObjectColor
,
5
,
CV_AA
);
circle
(
frame
,
Center
,
i
+
2
,
ObjectColor
,
2
,
CV_AA
);
...
...
@@ -245,7 +245,7 @@ public:
VideoWriter
*
writer
=
writers
->
operator
[](
range
.
start
);
CV_Assert
(
writer
!=
NULL
);
CV_Assert
(
writer
->
isOpened
());
Mat
frame
(
CreateVideoWriterInvoker
::
FrameSize
,
CV_8UC3
);
for
(
unsigned
int
i
=
0
;
i
<
FrameCount
;
++
i
)
{
...
...
@@ -253,7 +253,7 @@ public:
writer
->
operator
<<
(
frame
);
}
}
protected
:
static
std
::
string
to_string
(
unsigned
int
i
)
{
...
...
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