Merge pull request #1263 from abidrahmank:pyCLAHE_24
[profile/ivi/opencv.git] / modules / highgui / perf / perf_input.cpp
1 #include "perf_precomp.hpp"
2
3 #if BUILD_WITH_VIDEO_INPUT_SUPPORT
4
5 using namespace std;
6 using namespace cv;
7 using namespace perf;
8 using std::tr1::make_tuple;
9 using std::tr1::get;
10
11
12 typedef perf::TestBaseWithParam<String> VideoCapture_Reading;
13
14 #if defined(HAVE_MSMF)
15 // MPEG2 is not supported by Media Foundation yet
16 // http://social.msdn.microsoft.com/Forums/en-US/mediafoundationdevelopment/thread/39a36231-8c01-40af-9af5-3c105d684429
17 PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
18                                                "highgui/video/big_buck_bunny.mov",
19                                                "highgui/video/big_buck_bunny.mp4",
20                                                "highgui/video/big_buck_bunny.wmv" ) )
21
22 #else
23 PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
24                                                "highgui/video/big_buck_bunny.mov",
25                                                "highgui/video/big_buck_bunny.mp4",
26                                                "highgui/video/big_buck_bunny.mpg",
27                                                "highgui/video/big_buck_bunny.wmv" ) )
28 #endif
29 {
30   string filename = getDataPath(GetParam());
31
32   VideoCapture cap;
33
34   TEST_CYCLE() cap.open(filename);
35
36   bool dummy = cap.isOpened();
37   SANITY_CHECK(dummy);
38 }
39
40 #endif // BUILD_WITH_VIDEO_INPUT_SUPPORT