app: GST_EXPORT -> GST_APP_API
authorTim-Philipp Müller <tim@centricular.com>
Tue, 13 Mar 2018 10:28:21 +0000 (10:28 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 13 Mar 2018 10:29:55 +0000 (10:29 +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.

common
gst-libs/gst/app/Makefile.am
gst-libs/gst/app/app-prelude.h [new file with mode: 0644]
gst-libs/gst/app/app_mkenum.py
gst-libs/gst/app/gstappsink.h
gst-libs/gst/app/gstappsrc.h
gst-libs/gst/app/meson.build

diff --git a/common b/common
index 3fa2c9e..f0c2dc9 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 3fa2c9e372bceec30be91e67fb02b6cb05bed493
+Subproject commit f0c2dc9aadfa05bb5274c40da750104ecbb88cba
index 03de8a0..52f6ad3 100644 (file)
@@ -3,7 +3,8 @@ lib_LTLIBRARIES = libgstapp-@GST_API_VERSION@.la
 glib_enum_define = GST_APP
 glib_gen_prefix = __gst_app
 glib_gen_basename = app
-glib_gen_decl_banner=GST_EXPORT
+glib_gen_decl_banner=GST_APP_API
+glib_gen_decl_include=\#include <gst/app/app-prelude.h>
 
 glib_enum_headers = gstappsrc.h
 
@@ -23,6 +24,7 @@ libgstapp_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $
 libgstapp_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/app
 libgstapp_@GST_API_VERSION@include_HEADERS = \
        app.h \
+       app-prelude.h \
        gstappsrc.h \
        gstappsink.h
 nodist_libgstapp_@GST_API_VERSION@include_HEADERS = app-enumtypes.h
diff --git a/gst-libs/gst/app/app-prelude.h b/gst-libs/gst/app/app-prelude.h
new file mode 100644 (file)
index 0000000..c949c3e
--- /dev/null
@@ -0,0 +1,31 @@
+/* GStreamer App Library
+ * Copyright (C) 2018 GStreamer developers
+ *
+ * app-prelude.h: prelude include header for gst-app 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_APP_PRELUDE_H__
+#define __GST_APP_PRELUDE_H__
+
+#include <gst/gst.h>
+
+#ifndef GST_APP_API
+#define GST_APP_API GST_EXPORT
+#endif
+
+#endif /* __GST_APP_PRELUDE_H__ */
index e31fb5b..4d3123f 100755 (executable)
@@ -8,11 +8,11 @@
 import sys, os, shutil, subprocess
 
 h_array = ['--fhead',
-           "#ifndef __GST_APP_ENUM_TYPES_H__\n#define __GST_APP_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n\nG_BEGIN_DECLS\n",
+           "#ifndef __GST_APP_ENUM_TYPES_H__\n#define __GST_APP_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/app/app-prelude.h>\nG_BEGIN_DECLS\n",
            '--fprod',
            "\n/* enumerations from \"@filename@\" */\n",
            '--vhead',
-           'GST_EXPORT GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
+           'GST_APP_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
            '--ftail',
            'G_END_DECLS\n\n#endif /* __GST_APP_ENUM_TYPES_H__ */',
            ]
index f757aba..eeb6ce7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstbasesink.h>
+#include <gst/app/app-prelude.h>
 
 G_BEGIN_DECLS
 
@@ -101,61 +102,61 @@ struct _GstAppSinkClass
   gpointer     _gst_reserved[GST_PADDING - 2];
 };
 
-GST_EXPORT
+GST_APP_API
 GType           gst_app_sink_get_type         (void);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_caps         (GstAppSink *appsink, const GstCaps *caps);
 
-GST_EXPORT
+GST_APP_API
 GstCaps *       gst_app_sink_get_caps         (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 gboolean        gst_app_sink_is_eos           (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_emit_signals (GstAppSink *appsink, gboolean emit);
 
-GST_EXPORT
+GST_APP_API
 gboolean        gst_app_sink_get_emit_signals (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_max_buffers  (GstAppSink *appsink, guint max);
 
-GST_EXPORT
+GST_APP_API
 guint           gst_app_sink_get_max_buffers  (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_drop         (GstAppSink *appsink, gboolean drop);
 
-GST_EXPORT
+GST_APP_API
 gboolean        gst_app_sink_get_drop         (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_buffer_list_support  (GstAppSink *appsink, gboolean enable_lists);
 
-GST_EXPORT
+GST_APP_API
 gboolean        gst_app_sink_get_buffer_list_support  (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_wait_on_eos  (GstAppSink *appsink, gboolean wait);
 
-GST_EXPORT
+GST_APP_API
 gboolean        gst_app_sink_get_wait_on_eos  (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 GstSample *     gst_app_sink_pull_preroll     (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 GstSample *     gst_app_sink_pull_sample      (GstAppSink *appsink);
 
-GST_EXPORT
+GST_APP_API
 GstSample *     gst_app_sink_try_pull_preroll (GstAppSink *appsink, GstClockTime timeout);
 
-GST_EXPORT
+GST_APP_API
 GstSample *     gst_app_sink_try_pull_sample  (GstAppSink *appsink, GstClockTime timeout);
 
-GST_EXPORT
+GST_APP_API
 void            gst_app_sink_set_callbacks    (GstAppSink * appsink,
                                                GstAppSinkCallbacks *callbacks,
                                                gpointer user_data,
index 48d5eb3..2966a46 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstpushsrc.h>
+#include <gst/app/app-prelude.h>
 #include <gst/app/app-enumtypes.h>
 
 G_BEGIN_DECLS
@@ -117,67 +118,67 @@ struct _GstAppSrcClass
   gpointer     _gst_reserved[GST_PADDING-2];
 };
 
-GST_EXPORT
+GST_APP_API
 GType            gst_app_src_get_type                (void);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_caps                (GstAppSrc *appsrc, const GstCaps *caps);
 
-GST_EXPORT
+GST_APP_API
 GstCaps*         gst_app_src_get_caps                (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_size                (GstAppSrc *appsrc, gint64 size);
 
-GST_EXPORT
+GST_APP_API
 gint64           gst_app_src_get_size                (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_duration            (GstAppSrc *appsrc, GstClockTime duration);
 
-GST_EXPORT
+GST_APP_API
 GstClockTime     gst_app_src_get_duration            (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_stream_type         (GstAppSrc *appsrc, GstAppStreamType type);
 
-GST_EXPORT
+GST_APP_API
 GstAppStreamType gst_app_src_get_stream_type         (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_max_bytes           (GstAppSrc *appsrc, guint64 max);
 
-GST_EXPORT
+GST_APP_API
 guint64          gst_app_src_get_max_bytes           (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 guint64          gst_app_src_get_current_level_bytes (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_latency             (GstAppSrc *appsrc, guint64 min, guint64 max);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_get_latency             (GstAppSrc *appsrc, guint64 *min, guint64 *max);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_emit_signals        (GstAppSrc *appsrc, gboolean emit);
 
-GST_EXPORT
+GST_APP_API
 gboolean         gst_app_src_get_emit_signals        (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 GstFlowReturn    gst_app_src_push_buffer             (GstAppSrc *appsrc, GstBuffer *buffer);
 
-GST_EXPORT
+GST_APP_API
 GstFlowReturn    gst_app_src_push_buffer_list        (GstAppSrc * appsrc, GstBufferList * buffer_list);
 
-GST_EXPORT
+GST_APP_API
 GstFlowReturn    gst_app_src_end_of_stream           (GstAppSrc *appsrc);
 
-GST_EXPORT
+GST_APP_API
 GstFlowReturn    gst_app_src_push_sample             (GstAppSrc *appsrc, GstSample *sample);
 
-GST_EXPORT
+GST_APP_API
 void             gst_app_src_set_callbacks           (GstAppSrc * appsrc,
                                                       GstAppSrcCallbacks *callbacks,
                                                       gpointer user_data,
index f238514..fd1883b 100644 (file)
@@ -4,7 +4,7 @@ app_mkenum_headers = [
   'gstappsrc.h',
 ]
 
-app_headers = app_mkenum_headers + [ 'app.h', 'gstappsink.h' ]
+app_headers = app_mkenum_headers + [ 'app.h', 'app-prelude.h', 'gstappsink.h' ]
 install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
 
 mkenums = find_program('app_mkenum.py')