perf_input.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html
  4. #include "perf_precomp.hpp"
  5. #include "perf_camera.impl.hpp"
  6. namespace opencv_test
  7. {
  8. using namespace perf;
  9. typedef perf::TestBaseWithParam<std::string> VideoCapture_Reading;
  10. const string bunny_files[] = {
  11. "highgui/video/big_buck_bunny.avi",
  12. "highgui/video/big_buck_bunny.mov",
  13. "highgui/video/big_buck_bunny.mp4",
  14. #ifndef 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. "highgui/video/big_buck_bunny.mpg",
  18. #endif
  19. "highgui/video/big_buck_bunny.wmv"
  20. };
  21. PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::ValuesIn(bunny_files) )
  22. {
  23. string filename = getDataPath(GetParam());
  24. VideoCapture cap;
  25. TEST_CYCLE() cap.open(filename);
  26. SANITY_CHECK_NOTHING();
  27. }
  28. } // namespace