Home | History | Annotate | Download | only in test
      1 #ifdef __GNUC__
      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"
      6 #  endif
      7 #endif
      8 
      9 #ifndef __OPENCV_TEST_PRECOMP_HPP__
     10 #define __OPENCV_TEST_PRECOMP_HPP__
     11 
     12 #include <iostream>
     13 #include "opencv2/ts.hpp"
     14 #include "opencv2/imgproc.hpp"
     15 #include "opencv2/imgcodecs.hpp"
     16 #include "opencv2/videoio.hpp"
     17 #include "opencv2/imgproc/imgproc_c.h"
     18 
     19 #include "opencv2/core/private.hpp"
     20 
     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_QTKIT)        || \
     33     defined(HAVE_UNICAP)       || \
     34     defined(HAVE_PVAPI)        || \
     35     defined(HAVE_OPENNI)       || \
     36     defined(HAVE_XIMEA)        || \
     37     defined(HAVE_AVFOUNDATION) || \
     38     defined(HAVE_GIGE_API)     || \
     39     defined(HAVE_INTELPERC)    || \
     40     defined(HAVE_GPHOTO2)      || \
     41     (0)
     42 #  define BUILD_WITH_CAMERA_SUPPORT 1
     43 #else
     44 #  define BUILD_WITH_CAMERA_SUPPORT 0
     45 #endif
     46 
     47 #if defined(HAVE_XINE)         || \
     48     defined(HAVE_GSTREAMER)    || \
     49     defined(HAVE_QUICKTIME)    || \
     50     defined(HAVE_QTKIT)        || \
     51     defined(HAVE_AVFOUNDATION) || \
     52     /*defined(HAVE_OPENNI)     || too specialized */ \
     53     defined(HAVE_FFMPEG)       || \
     54     defined(HAVE_MSMF)
     55 #  define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
     56 #else
     57 #  define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
     58 #endif
     59 
     60 #if /*defined(HAVE_XINE)       || */\
     61     defined(HAVE_GSTREAMER)    || \
     62     defined(HAVE_QUICKTIME)    || \
     63     defined(HAVE_QTKIT)        || \
     64     defined(HAVE_AVFOUNDATION) || \
     65     defined(HAVE_FFMPEG)       || \
     66     defined(HAVE_MSMF)
     67 #  define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 1
     68 #else
     69 #  define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 0
     70 #endif
     71 
     72 namespace cvtest
     73 {
     74 
     75 string fourccToString(int fourcc);
     76 
     77 struct VideoFormat
     78 {
     79     VideoFormat() { fourcc = -1; }
     80     VideoFormat(const string& _ext, int _fourcc) : ext(_ext), fourcc(_fourcc) {}
     81     bool empty() const { return ext.empty(); }
     82 
     83     string ext;
     84     int fourcc;
     85 };
     86 
     87 extern const VideoFormat g_specific_fmt_list[];
     88 
     89 }
     90 
     91 #endif
     92