opencv: GST_EXPORT -> GST_OPENCV_API

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.
This commit is contained in:
Tim-Philipp Müller 2018-03-13 12:57:56 +00:00
parent 3eb033bba2
commit 456f60164c
5 changed files with 42 additions and 6 deletions

View 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

View file

@ -28,24 +28,25 @@
#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

View 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);

View file

@ -4,6 +4,7 @@ opencv_sources = [
]
opencv_headers = [
'opencv-prelude.h',
'gstopencvutils.h',
'gstopencvvideofilter.h',
]

View file

@ -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__ */