test_main.cpp 813 B

1234567891011121314151617181920212223
  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 "test_precomp.hpp"
  5. #include <opencv2/core/utils/logger.hpp>
  6. #if defined(HAVE_HPX)
  7. #include <hpx/hpx_main.hpp>
  8. #endif
  9. static
  10. void initTests()
  11. {
  12. const std::vector<cv::VideoCaptureAPIs> backends = cv::videoio_registry::getStreamBackends();
  13. bool requireFFmpeg = cv::utils::getConfigurationParameterBool("OPENCV_TEST_VIDEOIO_BACKEND_REQUIRE_FFMPEG");
  14. if (requireFFmpeg && !isBackendAvailable(cv::CAP_FFMPEG, backends))
  15. {
  16. CV_LOG_FATAL(NULL, "OpenCV-Test: required FFmpeg backend is not available (broken plugin?). STOP.");
  17. exit(1);
  18. }
  19. }
  20. CV_TEST_MAIN("highgui", initTests())