2 # pragma GCC diagnostic ignored "-Wmissing-declarations"
3 # if defined __clang__ || defined __APPLE__
4 # pragma GCC diagnostic ignored "-Wmissing-prototypes"
5 # pragma GCC diagnostic ignored "-Wextra"
9 #ifndef __OPENCV_TEST_PRECOMP_HPP__
10 #define __OPENCV_TEST_PRECOMP_HPP__
12 #ifdef HAVE_CVCONFIG_H
13 # include "cvconfig.h"
16 #include "opencv2/ts/ts.hpp"
17 #include "opencv2/imgproc/imgproc.hpp"
18 #include "opencv2/imgproc/imgproc_c.h"
21 #if defined(HAVE_DSHOW) || \
22 defined(HAVE_TYZX) || \
23 defined(HAVE_VFW) || \
24 defined(HAVE_LIBV4L) || \
25 (defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2)) || \
26 defined(HAVE_GSTREAMER) || \
27 defined(HAVE_DC1394_2) || \
28 defined(HAVE_DC1394) || \
29 defined(HAVE_CMU1394) || \
30 defined(HAVE_MIL) || \
31 defined(HAVE_QUICKTIME) || \
32 defined(HAVE_UNICAP) || \
33 defined(HAVE_PVAPI) || \
34 defined(HAVE_OPENNI) || \
35 defined(HAVE_XIMEA) || \
36 defined(HAVE_AVFOUNDATION) || \
37 defined(HAVE_GIGE_API) || \
39 //defined(HAVE_ANDROID_NATIVE_CAMERA) || - enable after #1193
40 # define BUILD_WITH_CAMERA_SUPPORT 1
42 # define BUILD_WITH_CAMERA_SUPPORT 0
45 #if defined(HAVE_XINE) || \
46 defined(HAVE_GSTREAMER) || \
47 defined(HAVE_QUICKTIME) || \
48 defined(HAVE_AVFOUNDATION) || \
49 /*defined(HAVE_OPENNI) || too specialized */ \
51 # define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
53 # define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
56 #if /*defined(HAVE_XINE) || */\
57 defined(HAVE_GSTREAMER) || \
58 defined(HAVE_QUICKTIME) || \
59 defined(HAVE_AVFOUNDATION) || \
61 # define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 1
63 # define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 0
69 string fourccToString(int fourcc);
73 VideoFormat() { fourcc = -1; }
74 VideoFormat(const string& _ext, int _fourcc) : ext(_ext), fourcc(_fourcc) {}
75 bool empty() const { return ext.empty(); }
81 extern const VideoFormat g_specific_fmt_list[];