File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
3
// of this distribution and at http://opencv.org/license.html.
4
4
#include " test_precomp.hpp"
5
+ #include < opencv2/core/utils/logger.hpp>
5
6
6
- CV_TEST_MAIN (" highgui" )
7
+ static
8
+ void initTests ()
9
+ {
10
+ #ifndef WINRT // missing getenv
11
+ const std::vector<cv::VideoCaptureAPIs> backends = cv::videoio_registry::getStreamBackends ();
12
+ const char * requireFFmpeg = getenv (" OPENCV_TEST_VIDEOIO_BACKEND_REQUIRE_FFMPEG" );
13
+ if (requireFFmpeg && !isBackendAvailable (cv::CAP_FFMPEG, backends))
14
+ {
15
+ CV_LOG_FATAL (NULL , " OpenCV-Test: required FFmpeg backend is not available (broken plugin?). STOP." );
16
+ exit (1 );
17
+ }
18
+ #endif
19
+ }
20
+
21
+ CV_TEST_MAIN (" highgui" , initTests())
You can’t perform that action at this time.
0 commit comments