From: Philippe Renon Date: Mon, 21 Nov 2016 16:19:46 +0000 (+0100) Subject: opencv: forward declare opencv types X-Git-Tag: 1.19.3~507^2~5831 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d130a19c8991eaed824f22d0b1a1bd138a07e49f;p=platform%2Fupstream%2Fgstreamer.git opencv: forward declare opencv types Forward declare opencv types to avoid exposing them in the API. https://bugzilla.gnome.org/show_bug.cgi?id=774223 --- diff --git a/ext/opencv/gstcvdilateerode.cpp b/ext/opencv/gstcvdilateerode.cpp index f12c991..2f4babc 100644 --- a/ext/opencv/gstcvdilateerode.cpp +++ b/ext/opencv/gstcvdilateerode.cpp @@ -53,6 +53,8 @@ #include "gst/opencv/gstopencvutils.h" #include "gstcvdilateerode.h" +#include + /* GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_erode_debug); #define GST_CAT_DEFAULT gst_cv_dilate_erode_debug diff --git a/gst-libs/gst/opencv/gstopencvvideofilter.cpp b/gst-libs/gst/opencv/gstopencvvideofilter.cpp index 4b8e536..b8db40f 100644 --- a/gst-libs/gst/opencv/gstopencvvideofilter.cpp +++ b/gst-libs/gst/opencv/gstopencvvideofilter.cpp @@ -50,6 +50,8 @@ #include "gstopencvvideofilter.h" #include "gstopencvutils.h" +#include + GST_DEBUG_CATEGORY_STATIC (gst_opencv_video_filter_debug); #define GST_CAT_DEFAULT gst_opencv_video_filter_debug diff --git a/gst-libs/gst/opencv/gstopencvvideofilter.h b/gst-libs/gst/opencv/gstopencvvideofilter.h index 7fbafe9..e74d4a2 100644 --- a/gst-libs/gst/opencv/gstopencvvideofilter.h +++ b/gst-libs/gst/opencv/gstopencvvideofilter.h @@ -46,9 +46,12 @@ #include #include -#include G_BEGIN_DECLS + +/* forward declare opencv type to avoid exposing them in this API */ +typedef struct _IplImage IplImage; + /* #defines don't like whitespacey bits */ #define GST_TYPE_OPENCV_VIDEO_FILTER \ (gst_opencv_video_filter_get_type()) @@ -60,7 +63,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OPENCV_VIDEO_FILTER)) #define GST_IS_OPENCV_VIDEO_FILTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPENCV_VIDEO_FILTER)) -#define GST_OPENCV_VIDEO_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OPENCV_VIDEO_FILTER,GstOpencvVideoFilterClass)) +#define GST_OPENCV_VIDEO_FILTER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OPENCV_VIDEO_FILTER,GstOpencvVideoFilterClass)) #define GST_OPENCV_VIDEO_FILTER_CAST(obj) ((GstOpencvVideoFilter *) (obj)) typedef struct _GstOpencvVideoFilter GstOpencvVideoFilter;