From 589407a077fb645d805b86494d9d7fc56a104a64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 11 Apr 2015 16:53:38 +0000 Subject: [PATCH] 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 --- ext/opencv/MotionCells.cpp | 1 + ext/opencv/MotionCells.h | 2 +- ext/opencv/gstcvdilate.c | 1 + ext/opencv/gstcvdilate.h | 2 +- ext/opencv/gstcvdilateerode.h | 2 +- ext/opencv/gstcvequalizehist.c | 1 + ext/opencv/gstcvequalizehist.h | 2 +- ext/opencv/gstcverode.c | 1 + ext/opencv/gstcverode.h | 2 +- ext/opencv/gstcvlaplace.c | 1 + ext/opencv/gstcvlaplace.h | 2 +- ext/opencv/gstcvsmooth.c | 1 + ext/opencv/gstcvsmooth.h | 2 +- ext/opencv/gstcvsobel.c | 1 + ext/opencv/gstcvsobel.h | 2 +- ext/opencv/gstdisparity.h | 2 +- ext/opencv/gstedgedetect.c | 1 + ext/opencv/gstedgedetect.h | 2 +- ext/opencv/gstfaceblur.c | 1 + ext/opencv/gstfaceblur.h | 2 +- ext/opencv/gstfacedetect.c | 1 + ext/opencv/gstfacedetect.h | 2 +- ext/opencv/gstgrabcut.cpp | 2 ++ ext/opencv/gstgrabcut.h | 3 ++- ext/opencv/gsthanddetect.c | 1 + ext/opencv/gsthanddetect.h | 10 +++++++--- ext/opencv/gstmotioncells.h | 2 +- ext/opencv/gstopencvutils.c | 1 + ext/opencv/gstopencvutils.h | 2 +- ext/opencv/gstopencvvideofilter.h | 2 +- ext/opencv/gstpyramidsegment.h | 2 +- ext/opencv/gstretinex.c | 1 + ext/opencv/gstretinex.h | 2 +- ext/opencv/gstsegmentation.cpp | 1 + ext/opencv/gstsegmentation.h | 3 ++- ext/opencv/gstskindetect.c | 2 ++ ext/opencv/gstskindetect.h | 2 +- ext/opencv/gsttemplatematch.c | 1 + ext/opencv/gsttemplatematch.h | 2 +- ext/opencv/gsttextoverlay.h | 1 + 40 files changed, 50 insertions(+), 24 deletions(-) diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp index 449fe24..eaa013f 100644 --- a/ext/opencv/MotionCells.cpp +++ b/ext/opencv/MotionCells.cpp @@ -54,6 +54,7 @@ #include #include #include "MotionCells.h" +#include MotionCells::MotionCells () { diff --git a/ext/opencv/MotionCells.h b/ext/opencv/MotionCells.h index 5c6d131..41bb9c7 100644 --- a/ext/opencv/MotionCells.h +++ b/ext/opencv/MotionCells.h @@ -45,7 +45,7 @@ #ifndef MOTIONCELLS_H_ #define MOTIONCELLS_H_ -#include // includes OpenCV definitions +#include #ifdef HAVE_HIGHGUI_H #include // includes highGUI definitions #endif diff --git a/ext/opencv/gstcvdilate.c b/ext/opencv/gstcvdilate.c index 3b55f45..da0713d 100644 --- a/ext/opencv/gstcvdilate.c +++ b/ext/opencv/gstcvdilate.c @@ -48,6 +48,7 @@ #include #include "gstcvdilate.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_debug); #define GST_CAT_DEFAULT gst_cv_dilate_debug diff --git a/ext/opencv/gstcvdilate.h b/ext/opencv/gstcvdilate.h index 21c3fbf..fdacdd8 100644 --- a/ext/opencv/gstcvdilate.h +++ b/ext/opencv/gstcvdilate.h @@ -45,7 +45,7 @@ #define __GST_CV_DILATE_H__ #include -#include + #include "gstcvdilateerode.h" G_BEGIN_DECLS diff --git a/ext/opencv/gstcvdilateerode.h b/ext/opencv/gstcvdilateerode.h index 20b55a6..94425f5 100644 --- a/ext/opencv/gstcvdilateerode.h +++ b/ext/opencv/gstcvdilateerode.h @@ -45,7 +45,7 @@ #define __GST_CV_DILATE_ERODE_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstcvequalizehist.c b/ext/opencv/gstcvequalizehist.c index 5c6526a..7384df1 100644 --- a/ext/opencv/gstcvequalizehist.c +++ b/ext/opencv/gstcvequalizehist.c @@ -49,6 +49,7 @@ #include "gstopencvutils.h" #include "gstcvequalizehist.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_equalize_hist_debug); #define GST_CAT_DEFAULT gst_cv_equalize_hist_debug diff --git a/ext/opencv/gstcvequalizehist.h b/ext/opencv/gstcvequalizehist.h index 0be379d..d1d600d 100644 --- a/ext/opencv/gstcvequalizehist.h +++ b/ext/opencv/gstcvequalizehist.h @@ -45,7 +45,7 @@ #define __GST_CV_EQUALIZE_HIST_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstcverode.c b/ext/opencv/gstcverode.c index a869a84..4c62624 100644 --- a/ext/opencv/gstcverode.c +++ b/ext/opencv/gstcverode.c @@ -48,6 +48,7 @@ #include #include "gstcverode.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_erode_debug); #define GST_CAT_DEFAULT gst_cv_erode_debug diff --git a/ext/opencv/gstcverode.h b/ext/opencv/gstcverode.h index bc474f3..3f2944a 100644 --- a/ext/opencv/gstcverode.h +++ b/ext/opencv/gstcverode.h @@ -45,7 +45,7 @@ #define __GST_CV_ERODE_H__ #include -#include + #include "gstcvdilateerode.h" G_BEGIN_DECLS diff --git a/ext/opencv/gstcvlaplace.c b/ext/opencv/gstcvlaplace.c index bd71ae6..5b95618 100644 --- a/ext/opencv/gstcvlaplace.c +++ b/ext/opencv/gstcvlaplace.c @@ -49,6 +49,7 @@ #include "gstopencvutils.h" #include "gstcvlaplace.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_laplace_debug); #define GST_CAT_DEFAULT gst_cv_laplace_debug diff --git a/ext/opencv/gstcvlaplace.h b/ext/opencv/gstcvlaplace.h index 93201e4..098b347 100644 --- a/ext/opencv/gstcvlaplace.h +++ b/ext/opencv/gstcvlaplace.h @@ -45,7 +45,7 @@ #define __GST_CV_LAPLACE_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstcvsmooth.c b/ext/opencv/gstcvsmooth.c index ec36173..67f403e 100644 --- a/ext/opencv/gstcvsmooth.c +++ b/ext/opencv/gstcvsmooth.c @@ -49,6 +49,7 @@ #include "gstopencvutils.h" #include "gstcvsmooth.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_smooth_debug); #define GST_CAT_DEFAULT gst_cv_smooth_debug diff --git a/ext/opencv/gstcvsmooth.h b/ext/opencv/gstcvsmooth.h index 16521d9..9a62e91 100644 --- a/ext/opencv/gstcvsmooth.h +++ b/ext/opencv/gstcvsmooth.h @@ -45,7 +45,7 @@ #define __GST_CV_SMOOTH_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstcvsobel.c b/ext/opencv/gstcvsobel.c index cd21189..1d9b151 100644 --- a/ext/opencv/gstcvsobel.c +++ b/ext/opencv/gstcvsobel.c @@ -49,6 +49,7 @@ #include "gstopencvutils.h" #include "gstcvsobel.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_cv_sobel_debug); #define GST_CAT_DEFAULT gst_cv_sobel_debug diff --git a/ext/opencv/gstcvsobel.h b/ext/opencv/gstcvsobel.h index 55885d3..c6719a0 100644 --- a/ext/opencv/gstcvsobel.h +++ b/ext/opencv/gstcvsobel.h @@ -45,7 +45,7 @@ #define __GST_CV_SOBEL_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstdisparity.h b/ext/opencv/gstdisparity.h index a1e0bdc..adbb9ae 100644 --- a/ext/opencv/gstdisparity.h +++ b/ext/opencv/gstdisparity.h @@ -45,7 +45,7 @@ #define __GST_DISPARITY_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gstedgedetect.c b/ext/opencv/gstedgedetect.c index bb85de4..14781bd 100644 --- a/ext/opencv/gstedgedetect.c +++ b/ext/opencv/gstedgedetect.c @@ -64,6 +64,7 @@ #include "gstopencvutils.h" #include "gstedgedetect.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_edge_detect_debug); #define GST_CAT_DEFAULT gst_edge_detect_debug diff --git a/ext/opencv/gstedgedetect.h b/ext/opencv/gstedgedetect.h index 065dccf..23c95e6 100644 --- a/ext/opencv/gstedgedetect.h +++ b/ext/opencv/gstedgedetect.h @@ -47,7 +47,7 @@ #define __GST_EDGE_DETECT_H__ #include -#include +#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstfaceblur.c b/ext/opencv/gstfaceblur.c index cadeaed..11d9145 100644 --- a/ext/opencv/gstfaceblur.c +++ b/ext/opencv/gstfaceblur.c @@ -65,6 +65,7 @@ #include "gstopencvutils.h" #include "gstfaceblur.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug); #define GST_CAT_DEFAULT gst_face_blur_debug diff --git a/ext/opencv/gstfaceblur.h b/ext/opencv/gstfaceblur.h index a6ee28e..23fa7fc 100644 --- a/ext/opencv/gstfaceblur.h +++ b/ext/opencv/gstfaceblur.h @@ -48,7 +48,7 @@ #define __GST_FACE_BLUR_H__ #include -#include +#include #include "gstopencvvideofilter.h" diff --git a/ext/opencv/gstfacedetect.c b/ext/opencv/gstfacedetect.c index fa01268..0f9425b 100644 --- a/ext/opencv/gstfacedetect.c +++ b/ext/opencv/gstfacedetect.c @@ -81,6 +81,7 @@ #include "gstopencvutils.h" #include "gstfacedetect.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug); #define GST_CAT_DEFAULT gst_face_detect_debug diff --git a/ext/opencv/gstfacedetect.h b/ext/opencv/gstfacedetect.h index 090fb79..6db7033 100644 --- a/ext/opencv/gstfacedetect.h +++ b/ext/opencv/gstfacedetect.h @@ -49,7 +49,7 @@ #define __GST_FACE_DETECT_H__ #include -#include +#include #include "gstopencvvideofilter.h" #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) diff --git a/ext/opencv/gstgrabcut.cpp b/ext/opencv/gstgrabcut.cpp index 8b57306..c9ff4f9 100644 --- a/ext/opencv/gstgrabcut.cpp +++ b/ext/opencv/gstgrabcut.cpp @@ -89,7 +89,9 @@ extern "C" { #include +#include } +#include GST_DEBUG_CATEGORY_STATIC (gst_grabcut_debug); #define GST_CAT_DEFAULT gst_grabcut_debug diff --git a/ext/opencv/gstgrabcut.h b/ext/opencv/gstgrabcut.h index ec7dc96..de988bb 100644 --- a/ext/opencv/gstgrabcut.h +++ b/ext/opencv/gstgrabcut.h @@ -47,8 +47,9 @@ #include #include #include +#include + -#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gsthanddetect.c b/ext/opencv/gsthanddetect.c index d01a42e..0faab59 100644 --- a/ext/opencv/gsthanddetect.c +++ b/ext/opencv/gsthanddetect.c @@ -63,6 +63,7 @@ /* element header */ #include "gsthanddetect.h" #include "gstopencvutils.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug); #define GST_CAT_DEFAULT gst_handdetect_debug diff --git a/ext/opencv/gsthanddetect.h b/ext/opencv/gsthanddetect.h index 129784f..e57f567 100644 --- a/ext/opencv/gsthanddetect.h +++ b/ext/opencv/gsthanddetect.h @@ -51,9 +51,13 @@ #include "gstopencvvideofilter.h" /* opencv */ -#include -#include -#include +#include +#ifdef HAVE_HIGHGUI_H +#include // includes highGUI definitions +#endif +#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H +#include // includes highGUI definitions +#endif #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #include #endif diff --git a/ext/opencv/gstmotioncells.h b/ext/opencv/gstmotioncells.h index 6d4b123..08eed3e 100644 --- a/ext/opencv/gstmotioncells.h +++ b/ext/opencv/gstmotioncells.h @@ -46,7 +46,7 @@ #define __GST_MOTIONCELLS_H__ #include -#include +#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstopencvutils.c b/ext/opencv/gstopencvutils.c index 6655b07..89901bf 100644 --- a/ext/opencv/gstopencvutils.c +++ b/ext/opencv/gstopencvutils.c @@ -24,6 +24,7 @@ #endif #include "gstopencvutils.h" +#include static gboolean gst_opencv_get_ipl_depth_and_channels (GstStructure * structure, diff --git a/ext/opencv/gstopencvutils.h b/ext/opencv/gstopencvutils.h index 82a2795..84123f1 100644 --- a/ext/opencv/gstopencvutils.h +++ b/ext/opencv/gstopencvutils.h @@ -29,7 +29,7 @@ #include #include -#include + gboolean gst_opencv_get_ipldepth (gint depth, gint bpp, gint * ipldepth); diff --git a/ext/opencv/gstopencvvideofilter.h b/ext/opencv/gstopencvvideofilter.h index fce3b32..7fbafe9 100644 --- a/ext/opencv/gstopencvvideofilter.h +++ b/ext/opencv/gstopencvvideofilter.h @@ -46,7 +46,7 @@ #include #include -#include +#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstpyramidsegment.h b/ext/opencv/gstpyramidsegment.h index 7d7bcf5..586ef2c 100644 --- a/ext/opencv/gstpyramidsegment.h +++ b/ext/opencv/gstpyramidsegment.h @@ -47,7 +47,7 @@ #define __GST_PYRAMID_SEGMENT_H__ #include -#include +#include #if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204 #include diff --git a/ext/opencv/gstretinex.c b/ext/opencv/gstretinex.c index 8c64b80..5bc112a 100644 --- a/ext/opencv/gstretinex.c +++ b/ext/opencv/gstretinex.c @@ -64,6 +64,7 @@ #include #include "gstretinex.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_retinex_debug); #define GST_CAT_DEFAULT gst_retinex_debug diff --git a/ext/opencv/gstretinex.h b/ext/opencv/gstretinex.h index 24a7c5e..c53d230 100644 --- a/ext/opencv/gstretinex.h +++ b/ext/opencv/gstretinex.h @@ -47,8 +47,8 @@ #include #include #include +#include -#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstsegmentation.cpp b/ext/opencv/gstsegmentation.cpp index ec03b80..79cbb49 100644 --- a/ext/opencv/gstsegmentation.cpp +++ b/ext/opencv/gstsegmentation.cpp @@ -94,6 +94,7 @@ #include "gstsegmentation.h" #include +#include GST_DEBUG_CATEGORY_STATIC (gst_segmentation_debug); #define GST_CAT_DEFAULT gst_segmentation_debug diff --git a/ext/opencv/gstsegmentation.h b/ext/opencv/gstsegmentation.h index 0357770..9400853 100644 --- a/ext/opencv/gstsegmentation.h +++ b/ext/opencv/gstsegmentation.h @@ -46,8 +46,9 @@ #include #include +#include + -#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstskindetect.c b/ext/opencv/gstskindetect.c index 9cd5633..caf38ec 100644 --- a/ext/opencv/gstskindetect.c +++ b/ext/opencv/gstskindetect.c @@ -62,6 +62,8 @@ #include "gstopencvutils.h" #include "gstskindetect.h" +#include +#include GST_DEBUG_CATEGORY_STATIC (gst_skin_detect_debug); #define GST_CAT_DEFAULT gst_skin_detect_debug diff --git a/ext/opencv/gstskindetect.h b/ext/opencv/gstskindetect.h index 9789834..910d22e 100644 --- a/ext/opencv/gstskindetect.h +++ b/ext/opencv/gstskindetect.h @@ -47,7 +47,7 @@ #define __GST_SKIN_DETECT_H__ #include -#include + #include G_BEGIN_DECLS diff --git a/ext/opencv/gsttemplatematch.c b/ext/opencv/gsttemplatematch.c index 602dd8e..3c97841 100644 --- a/ext/opencv/gsttemplatematch.c +++ b/ext/opencv/gsttemplatematch.c @@ -66,6 +66,7 @@ #include "../../gst-libs/gst/gst-i18n-plugin.h" #include "gstopencvutils.h" #include "gsttemplatematch.h" +#include GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug); #define GST_CAT_DEFAULT gst_template_match_debug diff --git a/ext/opencv/gsttemplatematch.h b/ext/opencv/gsttemplatematch.h index 6b67000..44d3d9c 100644 --- a/ext/opencv/gsttemplatematch.h +++ b/ext/opencv/gsttemplatematch.h @@ -47,7 +47,7 @@ #define __GST_TEMPLATE_MATCH_H__ #include -#include + #ifdef HAVE_HIGHGUI_H #include // includes highGUI definitions #endif diff --git a/ext/opencv/gsttextoverlay.h b/ext/opencv/gsttextoverlay.h index cf59b35..1fe8d22 100644 --- a/ext/opencv/gsttextoverlay.h +++ b/ext/opencv/gsttextoverlay.h @@ -48,6 +48,7 @@ #include #include "gstopencvutils.h" +#include G_BEGIN_DECLS /* #defines don't like whitespacey bits */ -- 2.7.4