opencv: GST_EXPORT -> GST_OPENCV_API
authorTim-Philipp Müller <tim@centricular.com>
Tue, 13 Mar 2018 12:57:56 +0000 (12:57 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 13 Mar 2018 12:57:56 +0000 (12:57 +0000)
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.

gst-libs/gst/opencv/Makefile.am
gst-libs/gst/opencv/gstopencvutils.h
gst-libs/gst/opencv/gstopencvvideofilter.h
gst-libs/gst/opencv/meson.build
gst-libs/gst/opencv/opencv-prelude.h [new file with mode: 0644]

index 9d18a5f..cc0d67f 100644 (file)
@@ -5,6 +5,7 @@ libgstopencv_@GST_API_VERSION@_la_SOURCES = \
        gstopencvvideofilter.cpp
 
 libgstopencv_@GST_API_VERSION@_la_CXXFLAGS = \
+       $(GST_PLUGINS_BAD_CFLAGS) \
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) \
        $(OPENCV_CFLAGS)
 
@@ -17,5 +18,6 @@ libgstopencv_@GST_API_VERSION@_la_LDFLAGS = \
 libgstopencv_@GST_API_VERSION@includedir = \
        $(includedir)/gstreamer-@GST_API_VERSION@/gst/opencv
 libgstopencv_@GST_API_VERSION@include_HEADERS = \
+       opencv-prelude.h \
        gstopencvutils.h \
        gstopencvvideofilter.h
index d6aa6ca..3b74cc9 100644 (file)
 
 #include <gst/gst.h>
 #include <gst/video/video.h>
+#include <gst/opencv/opencv-prelude.h>
 
 G_BEGIN_DECLS
 
-GST_EXPORT
+GST_OPENCV_API
 gboolean gst_opencv_parse_iplimage_params_from_caps
     (GstCaps * caps, gint * width, gint * height, gint * depth,
     gint * channels, GError ** err);
 
-GST_EXPORT
+GST_OPENCV_API
 gboolean gst_opencv_iplimage_params_from_video_info
     (GstVideoInfo * info, gint * width, gint * height, gint * depth,
     gint * channels, GError ** err);
 
-GST_EXPORT
+GST_OPENCV_API
 gboolean gst_opencv_cv_image_type_from_video_format (GstVideoFormat format,
     int * cv_type, GError ** err);
 
-GST_EXPORT
+GST_OPENCV_API
 GstCaps * gst_opencv_caps_from_cv_image_type (int cv_type);
 
 G_END_DECLS
index 2aa43e9..58f1bda 100644 (file)
@@ -46,6 +46,7 @@
 
 #include <gst/gst.h>
 #include <gst/video/gstvideofilter.h>
+#include <gst/opencv/opencv-prelude.h>
 
 G_BEGIN_DECLS
 
@@ -101,10 +102,10 @@ struct _GstOpencvVideoFilterClass
   GstOpencvVideoFilterSetCaps cv_set_caps;
 };
 
-GST_EXPORT
+GST_OPENCV_API
 GType gst_opencv_video_filter_get_type (void);
 
-GST_EXPORT
+GST_OPENCV_API
 void gst_opencv_video_filter_set_in_place (GstOpencvVideoFilter * transform,
                                            gboolean ip);
 
index 80639d3..ba132aa 100644 (file)
@@ -4,6 +4,7 @@ opencv_sources = [
 ]
 
 opencv_headers = [
+  'opencv-prelude.h',
   'gstopencvutils.h',
   'gstopencvvideofilter.h',
 ]
diff --git a/gst-libs/gst/opencv/opencv-prelude.h b/gst-libs/gst/opencv/opencv-prelude.h
new file mode 100644 (file)
index 0000000..2cbea56
--- /dev/null
@@ -0,0 +1,31 @@
+/* GStreamer OpenCV Library
+ * Copyright (C) 2018 GStreamer developers
+ *
+ * opencv-prelude.h: prelude include header for gst-opencv library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_OPENCV_PRELUDE_H__
+#define __GST_OPENCV_PRELUDE_H__
+
+#include <gst/gst.h>
+
+#ifndef GST_OPENCV_API
+#define GST_OPENCV_API GST_EXPORT
+#endif
+
+#endif /* __GST_OPENCV_PRELUDE_H__ */