opencv: Change opencv plugin to use opencv2-style includes

If old opencv1-style legacy include directory is available,
this change becomes purely cosmetic (maybe will compile a bit faster).
It becomes an FTBFS fix when opencv1-style include directory is missing
(possibly because opencv package maintainer decided not to pack it).

https://bugzilla.gnome.org/show_bug.cgi?id=747705
This commit is contained in:
Руслан Ижбулатов 2015-04-11 16:53:38 +00:00 committed by Sebastian Dröge
parent 64080e632d
commit 589407a077
40 changed files with 50 additions and 24 deletions

View file

@ -54,6 +54,7 @@
#include <math.h> #include <math.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "MotionCells.h" #include "MotionCells.h"
#include <opencv2/imgproc/imgproc_c.h>
MotionCells::MotionCells () MotionCells::MotionCells ()
{ {

View file

@ -45,7 +45,7 @@
#ifndef MOTIONCELLS_H_ #ifndef MOTIONCELLS_H_
#define MOTIONCELLS_H_ #define MOTIONCELLS_H_
#include <cv.h> // includes OpenCV definitions #include <opencv2/core/core_c.h>
#ifdef HAVE_HIGHGUI_H #ifdef HAVE_HIGHGUI_H
#include <highgui.h> // includes highGUI definitions #include <highgui.h> // includes highGUI definitions
#endif #endif

View file

@ -48,6 +48,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstcvdilate.h" #include "gstcvdilate.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_debug);
#define GST_CAT_DEFAULT gst_cv_dilate_debug #define GST_CAT_DEFAULT gst_cv_dilate_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_DILATE_H__ #define __GST_CV_DILATE_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include "gstcvdilateerode.h" #include "gstcvdilateerode.h"
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -45,7 +45,7 @@
#define __GST_CV_DILATE_ERODE_H__ #define __GST_CV_DILATE_ERODE_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -49,6 +49,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstcvequalizehist.h" #include "gstcvequalizehist.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_equalize_hist_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_equalize_hist_debug);
#define GST_CAT_DEFAULT gst_cv_equalize_hist_debug #define GST_CAT_DEFAULT gst_cv_equalize_hist_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_EQUALIZE_HIST_H__ #define __GST_CV_EQUALIZE_HIST_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -48,6 +48,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstcverode.h" #include "gstcverode.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_erode_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_erode_debug);
#define GST_CAT_DEFAULT gst_cv_erode_debug #define GST_CAT_DEFAULT gst_cv_erode_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_ERODE_H__ #define __GST_CV_ERODE_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include "gstcvdilateerode.h" #include "gstcvdilateerode.h"
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -49,6 +49,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstcvlaplace.h" #include "gstcvlaplace.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_laplace_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_laplace_debug);
#define GST_CAT_DEFAULT gst_cv_laplace_debug #define GST_CAT_DEFAULT gst_cv_laplace_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_LAPLACE_H__ #define __GST_CV_LAPLACE_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -49,6 +49,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstcvsmooth.h" #include "gstcvsmooth.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_smooth_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_smooth_debug);
#define GST_CAT_DEFAULT gst_cv_smooth_debug #define GST_CAT_DEFAULT gst_cv_smooth_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_SMOOTH_H__ #define __GST_CV_SMOOTH_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -49,6 +49,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstcvsobel.h" #include "gstcvsobel.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_cv_sobel_debug); GST_DEBUG_CATEGORY_STATIC (gst_cv_sobel_debug);
#define GST_CAT_DEFAULT gst_cv_sobel_debug #define GST_CAT_DEFAULT gst_cv_sobel_debug

View file

@ -45,7 +45,7 @@
#define __GST_CV_SOBEL_H__ #define __GST_CV_SOBEL_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -45,7 +45,7 @@
#define __GST_DISPARITY_H__ #define __GST_DISPARITY_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <opencv2/legacy/legacy.hpp> #include <opencv2/legacy/legacy.hpp>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -64,6 +64,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstedgedetect.h" #include "gstedgedetect.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_edge_detect_debug); GST_DEBUG_CATEGORY_STATIC (gst_edge_detect_debug);
#define GST_CAT_DEFAULT gst_edge_detect_debug #define GST_CAT_DEFAULT gst_edge_detect_debug

View file

@ -47,7 +47,7 @@
#define __GST_EDGE_DETECT_H__ #define __GST_EDGE_DETECT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h> #include <opencv2/core/core_c.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -65,6 +65,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstfaceblur.h" #include "gstfaceblur.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug); GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
#define GST_CAT_DEFAULT gst_face_blur_debug #define GST_CAT_DEFAULT gst_face_blur_debug

View file

@ -48,7 +48,7 @@
#define __GST_FACE_BLUR_H__ #define __GST_FACE_BLUR_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h> #include <opencv2/core/version.hpp>
#include "gstopencvvideofilter.h" #include "gstopencvvideofilter.h"

View file

@ -81,6 +81,7 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstfacedetect.h" #include "gstfacedetect.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug); GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug);
#define GST_CAT_DEFAULT gst_face_detect_debug #define GST_CAT_DEFAULT gst_face_detect_debug

View file

@ -49,7 +49,7 @@
#define __GST_FACE_DETECT_H__ #define __GST_FACE_DETECT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h> #include <opencv2/core/version.hpp>
#include "gstopencvvideofilter.h" #include "gstopencvvideofilter.h"
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)

View file

@ -89,7 +89,9 @@
extern "C" extern "C"
{ {
#include <gst/video/gstvideometa.h> #include <gst/video/gstvideometa.h>
#include <opencv2/imgproc/imgproc_c.h>
} }
#include <opencv2/imgproc/imgproc.hpp>
GST_DEBUG_CATEGORY_STATIC (gst_grabcut_debug); GST_DEBUG_CATEGORY_STATIC (gst_grabcut_debug);
#define GST_CAT_DEFAULT gst_grabcut_debug #define GST_CAT_DEFAULT gst_grabcut_debug

View file

@ -47,8 +47,9 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include <opencv2/core/core_c.h>
#include <cv.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -63,6 +63,7 @@
/* element header */ /* element header */
#include "gsthanddetect.h" #include "gsthanddetect.h"
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug); GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug);
#define GST_CAT_DEFAULT gst_handdetect_debug #define GST_CAT_DEFAULT gst_handdetect_debug

View file

@ -51,9 +51,13 @@
#include "gstopencvvideofilter.h" #include "gstopencvvideofilter.h"
/* opencv */ /* opencv */
#include <cv.h> #include <opencv2/core/version.hpp>
#include <cxcore.h> #ifdef HAVE_HIGHGUI_H
#include <highgui.h> #include <highgui.h> // includes highGUI definitions
#endif
#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
#include <opencv2/highgui/highgui_c.h> // includes highGUI definitions
#endif
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
#include <opencv2/objdetect/objdetect.hpp> #include <opencv2/objdetect/objdetect.hpp>
#endif #endif

View file

@ -46,7 +46,7 @@
#define __GST_MOTIONCELLS_H__ #define __GST_MOTIONCELLS_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h> #include <opencv2/core/core_c.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -24,6 +24,7 @@
#endif #endif
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include <opencv2/core/types_c.h>
static gboolean static gboolean
gst_opencv_get_ipl_depth_and_channels (GstStructure * structure, gst_opencv_get_ipl_depth_and_channels (GstStructure * structure,

View file

@ -29,7 +29,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <cv.h>
gboolean gboolean
gst_opencv_get_ipldepth (gint depth, gint bpp, gint * ipldepth); gst_opencv_get_ipldepth (gint depth, gint bpp, gint * ipldepth);

View file

@ -46,7 +46,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include <cv.h> #include <opencv2/core/core_c.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -47,7 +47,7 @@
#define __GST_PYRAMID_SEGMENT_H__ #define __GST_PYRAMID_SEGMENT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h> #include <opencv2/core/version.hpp>
#if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204 #if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204
#include <opencv2/legacy/legacy.hpp> #include <opencv2/legacy/legacy.hpp>

View file

@ -64,6 +64,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstretinex.h" #include "gstretinex.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_retinex_debug); GST_DEBUG_CATEGORY_STATIC (gst_retinex_debug);
#define GST_CAT_DEFAULT gst_retinex_debug #define GST_CAT_DEFAULT gst_retinex_debug

View file

@ -47,8 +47,8 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include <opencv2/core/core_c.h>
#include <cv.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -94,6 +94,7 @@
#include "gstsegmentation.h" #include "gstsegmentation.h"
#include <opencv2/video/background_segm.hpp> #include <opencv2/video/background_segm.hpp>
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_segmentation_debug); GST_DEBUG_CATEGORY_STATIC (gst_segmentation_debug);
#define GST_CAT_DEFAULT gst_segmentation_debug #define GST_CAT_DEFAULT gst_segmentation_debug

View file

@ -46,8 +46,9 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include <opencv2/core/core_c.h>
#include <cv.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */

View file

@ -62,6 +62,8 @@
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gstskindetect.h" #include "gstskindetect.h"
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/legacy/compat.hpp>
GST_DEBUG_CATEGORY_STATIC (gst_skin_detect_debug); GST_DEBUG_CATEGORY_STATIC (gst_skin_detect_debug);
#define GST_CAT_DEFAULT gst_skin_detect_debug #define GST_CAT_DEFAULT gst_skin_detect_debug

View file

@ -47,7 +47,7 @@
#define __GST_SKIN_DETECT_H__ #define __GST_SKIN_DETECT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#include <gstopencvvideofilter.h> #include <gstopencvvideofilter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -66,6 +66,7 @@
#include "../../gst-libs/gst/gst-i18n-plugin.h" #include "../../gst-libs/gst/gst-i18n-plugin.h"
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include "gsttemplatematch.h" #include "gsttemplatematch.h"
#include <opencv2/imgproc/imgproc_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug); GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug);
#define GST_CAT_DEFAULT gst_template_match_debug #define GST_CAT_DEFAULT gst_template_match_debug

View file

@ -47,7 +47,7 @@
#define __GST_TEMPLATE_MATCH_H__ #define __GST_TEMPLATE_MATCH_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <cv.h>
#ifdef HAVE_HIGHGUI_H #ifdef HAVE_HIGHGUI_H
#include <highgui.h> // includes highGUI definitions #include <highgui.h> // includes highGUI definitions
#endif #endif

View file

@ -48,6 +48,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstopencvutils.h" #include "gstopencvutils.h"
#include <opencv2/core/core_c.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* #defines don't like whitespacey bits */ /* #defines don't like whitespacey bits */