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
This commit is contained in:
Philippe Renon 2016-11-21 17:19:46 +01:00 committed by Luis
parent 6cc049452a
commit d130a19c89
3 changed files with 10 additions and 2 deletions

View file

@ -53,6 +53,8 @@
#include "gst/opencv/gstopencvutils.h"
#include "gstcvdilateerode.h"
#include <opencv2/core/core_c.h>
/*
GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_erode_debug);
#define GST_CAT_DEFAULT gst_cv_dilate_erode_debug

View file

@ -50,6 +50,8 @@
#include "gstopencvvideofilter.h"
#include "gstopencvutils.h"
#include <opencv2/core/core_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_opencv_video_filter_debug);
#define GST_CAT_DEFAULT gst_opencv_video_filter_debug

View file

@ -46,9 +46,12 @@
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
#include <opencv2/core/core_c.h>
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;