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 # include "cvconfig.h"
14 #include "opencv2/ts/ts.hpp"
15 #include "opencv2/imgproc/imgproc.hpp"
16 #include "opencv2/imgproc/imgproc_c.h"
19 #if defined(HAVE_DSHOW) || \
20 defined(HAVE_TYZX) || \
21 defined(HAVE_VFW) || \
22 defined(HAVE_LIBV4L) || \
23 (defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2)) || \
24 defined(HAVE_GSTREAMER) || \
25 defined(HAVE_DC1394_2) || \
26 defined(HAVE_DC1394) || \
27 defined(HAVE_CMU1394) || \
28 defined(HAVE_MIL) || \
29 defined(HAVE_QUICKTIME) || \
30 defined(HAVE_UNICAP) || \
31 defined(HAVE_PVAPI) || \
32 defined(HAVE_OPENNI) || \
33 defined(HAVE_XIMEA) || \
34 defined(HAVE_AVFOUNDATION) || \
35 defined(HAVE_GIGE_API) || \
37 //defined(HAVE_ANDROID_NATIVE_CAMERA) || - enable after #1193
38 # define BUILD_WITH_CAMERA_SUPPORT 1
40 # define BUILD_WITH_CAMERA_SUPPORT 0
43 #if defined(HAVE_XINE) || \
44 defined(HAVE_GSTREAMER) || \
45 defined(HAVE_QUICKTIME) || \
46 defined(HAVE_AVFOUNDATION) || \
47 /*defined(HAVE_OPENNI) || too specialized */ \
48 defined(HAVE_FFMPEG) || \
50 # define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
52 # define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
55 #if /*defined(HAVE_XINE) || */\
56 defined(HAVE_GSTREAMER) || \
57 defined(HAVE_QUICKTIME) || \
58 defined(HAVE_AVFOUNDATION) || \
59 defined(HAVE_FFMPEG) || \
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[];