mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 02:19:12 +08:00
2c4bbb313c
Conflicts: cmake/OpenCVConfig.cmake cmake/OpenCVLegacyOptions.cmake modules/contrib/src/retina.cpp modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst modules/gpu/doc/video.rst modules/gpu/src/speckle_filtering.cpp modules/python/src2/cv2.cv.hpp modules/python/test/test2.py samples/python/watershed.py
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#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
|