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
23456d67
Commit
23456d67
authored
Sep 26, 2014
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test on CAP_PROP_FRAMECOUNT option for cv::VideoCapture
parent
15251056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
test_basic_props.cpp
modules/videoio/test/test_basic_props.cpp
+23
-0
No files found.
modules/videoio/test/test_basic_props.cpp
View file @
23456d67
...
...
@@ -131,4 +131,27 @@ TEST(Videoio_Video, prop_fps)
}
}
TEST
(
Videoio_Video
,
prop_framecount
)
{
const
size_t
n
=
sizeof
(
ext
)
/
sizeof
(
ext
[
0
]);
const
string
src_dir
=
TS
::
ptr
()
->
get_data_path
();
TS
::
ptr
()
->
printf
(
cvtest
::
TS
::
LOG
,
"
\n\n
Source files directory: %s
\n
"
,
(
src_dir
+
"video/"
).
c_str
());
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
{
string
file_path
=
src_dir
+
"video/big_buck_bunny."
+
ext
[
i
];
VideoCapture
cap
(
file_path
);
if
(
!
cap
.
isOpened
())
{
TS
::
ptr
()
->
printf
(
cvtest
::
TS
::
LOG
,
"
\n
File information (video %d):
\n\n
Name: big_buck_bunny.%s
\n
FAILED
\n\n
"
,
i
+
1
,
ext
[
i
].
c_str
());
TS
::
ptr
()
->
printf
(
cvtest
::
TS
::
LOG
,
"Error: cannot read source video file.
\n
"
);
TS
::
ptr
()
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_TEST_DATA
);
return
;
}
ASSERT_EQ
(
125
,
cap
.
get
(
CAP_PROP_FRAME_COUNT
));
}
}
#endif
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