• Roman Donchenko's avatar
    Merge remote-tracking branch 'origin/2.4' into merge-2.4 · 4cf9990d
    Roman Donchenko authored
    Conflicts:
    	doc/tutorials/definitions/noContent.rst
    	doc/tutorials/gpu/gpu-basics-similarity/gpu-basics-similarity.rst
    	doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst
    	doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.rst
    	modules/core/include/opencv2/core/core.hpp
    	modules/core/include/opencv2/core/internal.hpp
    	modules/core/include/opencv2/core/version.hpp
    	modules/gpu/CMakeLists.txt
    	modules/highgui/perf/perf_output.cpp
    	modules/highgui/test/test_video_io.cpp
    	modules/ocl/include/opencv2/ocl/ocl.hpp
    	modules/ocl/perf/main.cpp
    	modules/ocl/src/hog.cpp
    	modules/ocl/src/initialization.cpp
    	modules/ocl/src/moments.cpp
    	modules/ocl/src/opencl/moments.cl
    	modules/ocl/test/main.cpp
    	modules/ocl/test/test_moments.cpp
    	modules/python/test/test.py
    	modules/ts/include/opencv2/ts/ts_perf.hpp
    	modules/ts/src/precomp.hpp
    	modules/ts/src/ts_perf.cpp
    4cf9990d
perf_input.cpp 1.4 KB
#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;


typedef perf::TestBaseWithParam<std::string> VideoCapture_Reading;

#if defined(HAVE_MSMF)
// MPEG2 is not supported by Media Foundation yet
// http://social.msdn.microsoft.com/Forums/en-US/mediafoundationdevelopment/thread/39a36231-8c01-40af-9af5-3c105d684429
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
                                               "highgui/video/big_buck_bunny.mov",
                                               "highgui/video/big_buck_bunny.mp4",
                                               "highgui/video/big_buck_bunny.wmv" ) )

#else
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
                                               "highgui/video/big_buck_bunny.mov",
                                               "highgui/video/big_buck_bunny.mp4",
                                               "highgui/video/big_buck_bunny.mpg",
                                               "highgui/video/big_buck_bunny.wmv" ) )
#endif
{
  string filename = getDataPath(GetParam());

  VideoCapture cap;

  TEST_CYCLE() cap.open(filename);

  bool dummy = cap.isOpened();
  SANITY_CHECK(dummy);
}

#endif // BUILD_WITH_VIDEO_INPUT_SUPPORT