From 6b286fb7ddeae1d45907465c49b8a414ae208332 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 12 Mar 2018 23:03:26 +0000 Subject: [PATCH] controller: GST_EXPORT -> GST_CONTROLLER_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. --- common | 2 +- libs/gst/controller/Makefile.am | 4 ++- libs/gst/controller/controller-prelude.h | 31 ++++++++++++++++++++++ libs/gst/controller/controller.h | 2 ++ libs/gst/controller/controller_mkenum.py | 4 +-- libs/gst/controller/gstargbcontrolbinding.h | 5 ++-- libs/gst/controller/gstdirectcontrolbinding.h | 7 ++--- .../gst/controller/gstinterpolationcontrolsource.h | 4 +-- libs/gst/controller/gstlfocontrolsource.h | 4 +-- libs/gst/controller/gstproxycontrolbinding.h | 5 ++-- libs/gst/controller/gsttimedvaluecontrolsource.h | 27 +++++++++---------- libs/gst/controller/gsttriggercontrolsource.h | 4 +-- libs/gst/controller/meson.build | 1 + 13 files changed, 69 insertions(+), 31 deletions(-) create mode 100644 libs/gst/controller/controller-prelude.h diff --git a/common b/common index 3fa2c9e..f0c2dc9 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 3fa2c9e372bceec30be91e67fb02b6cb05bed493 +Subproject commit f0c2dc9aadfa05bb5274c40da750104ecbb88cba diff --git a/libs/gst/controller/Makefile.am b/libs/gst/controller/Makefile.am index fae7a2f..b1675c7 100644 --- a/libs/gst/controller/Makefile.am +++ b/libs/gst/controller/Makefile.am @@ -7,7 +7,8 @@ glib_enum_headers= \ glib_enum_define = GST_CONTROLLER glib_gen_prefix = gst glib_gen_basename = controller -glib_gen_decl_banner=GST_EXPORT +glib_gen_decl_banner=GST_CONTROLLER_API +glib_gen_decl_include=\#include built_sources = controller-enumtypes.c built_headers = controller-enumtypes.h @@ -16,6 +17,7 @@ BUILT_SOURCES = $(built_sources) $(built_headers) libgstcontroller_@GST_API_VERSION@_includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/controller libgstcontroller_@GST_API_VERSION@_include_HEADERS = \ controller.h \ + controller-prelude.h \ gstargbcontrolbinding.h \ gstdirectcontrolbinding.h \ gsttimedvaluecontrolsource.h \ diff --git a/libs/gst/controller/controller-prelude.h b/libs/gst/controller/controller-prelude.h new file mode 100644 index 0000000..852b53d --- /dev/null +++ b/libs/gst/controller/controller-prelude.h @@ -0,0 +1,31 @@ +/* GStreamer Controller Library + * Copyright (C) 2018 GStreamer developers + * + * controller-prelude.h: prelude include header for gst-controller 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_CONTROLLER_PRELUDE_H__ +#define __GST_CONTROLLER_PRELUDE_H__ + +#include + +#ifndef GST_CONTROLLER_API +#define GST_CONTROLLER_API GST_EXPORT +#endif + +#endif /* __GST_CONTROLLER_PRELUDE_H__ */ diff --git a/libs/gst/controller/controller.h b/libs/gst/controller/controller.h index 383c0cf..79ae8ce 100644 --- a/libs/gst/controller/controller.h +++ b/libs/gst/controller/controller.h @@ -22,6 +22,8 @@ #ifndef __GST_CONTROLLER_H__ #define __GST_CONTROLLER_H__ +#include + #include #include #include diff --git a/libs/gst/controller/controller_mkenum.py b/libs/gst/controller/controller_mkenum.py index a9fc182..01d8478 100755 --- a/libs/gst/controller/controller_mkenum.py +++ b/libs/gst/controller/controller_mkenum.py @@ -8,11 +8,11 @@ import sys, os, shutil, subprocess h_array = ['--fhead', - "#ifndef __GST_CONTROLLER_ENUM_TYPES_H__\n#define __GST_CONTROLLER_ENUM_TYPES_H__\n\n#include \n#include \n\nG_BEGIN_DECLS\n", + "#ifndef __GST_CONTROLLER_ENUM_TYPES_H__\n#define __GST_CONTROLLER_ENUM_TYPES_H__\n\n#include \n#include \n#include \n\nG_BEGIN_DECLS\n", '--fprod', "\n/* enumerations from \"@filename@\" */\n", '--vhead', - 'GST_EXPORT\nGType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n', + 'GST_CONTROLLER_API\nGType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n', '--ftail', 'G_END_DECLS\n\n#endif /* __GST_CONTROLLER_ENUM_TYPES_H__ */', ] diff --git a/libs/gst/controller/gstargbcontrolbinding.h b/libs/gst/controller/gstargbcontrolbinding.h index 0e7224f..caabed3 100644 --- a/libs/gst/controller/gstargbcontrolbinding.h +++ b/libs/gst/controller/gstargbcontrolbinding.h @@ -29,6 +29,7 @@ #include #include +#include G_BEGIN_DECLS @@ -85,12 +86,12 @@ struct _GstARGBControlBindingClass gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_argb_control_binding_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GstControlBinding * gst_argb_control_binding_new (GstObject * object, const gchar * property_name, GstControlSource * cs_a, GstControlSource * cs_r, GstControlSource * cs_g, GstControlSource * cs_b); diff --git a/libs/gst/controller/gstdirectcontrolbinding.h b/libs/gst/controller/gstdirectcontrolbinding.h index 6681fce..c84b870 100644 --- a/libs/gst/controller/gstdirectcontrolbinding.h +++ b/libs/gst/controller/gstdirectcontrolbinding.h @@ -28,6 +28,7 @@ #include #include +#include G_BEGIN_DECLS @@ -109,15 +110,15 @@ struct _GstDirectControlBindingClass gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_direct_control_binding_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GstControlBinding * gst_direct_control_binding_new (GstObject * object, const gchar * property_name, GstControlSource * cs); -GST_EXPORT +GST_CONTROLLER_API GstControlBinding * gst_direct_control_binding_new_absolute (GstObject * object, const gchar * property_name, GstControlSource * cs); diff --git a/libs/gst/controller/gstinterpolationcontrolsource.h b/libs/gst/controller/gstinterpolationcontrolsource.h index 3f8c0b7..65d164f 100644 --- a/libs/gst/controller/gstinterpolationcontrolsource.h +++ b/libs/gst/controller/gstinterpolationcontrolsource.h @@ -89,12 +89,12 @@ struct _GstInterpolationControlSourceClass { gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_interpolation_control_source_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GstControlSource * gst_interpolation_control_source_new (void); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/libs/gst/controller/gstlfocontrolsource.h b/libs/gst/controller/gstlfocontrolsource.h index 27d358d..41bc100 100644 --- a/libs/gst/controller/gstlfocontrolsource.h +++ b/libs/gst/controller/gstlfocontrolsource.h @@ -87,12 +87,12 @@ struct _GstLFOControlSourceClass { gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_lfo_control_source_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GstControlSource *gst_lfo_control_source_new (void); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/libs/gst/controller/gstproxycontrolbinding.h b/libs/gst/controller/gstproxycontrolbinding.h index b5b49f6..b39e760 100644 --- a/libs/gst/controller/gstproxycontrolbinding.h +++ b/libs/gst/controller/gstproxycontrolbinding.h @@ -22,6 +22,7 @@ #define __GST_PROXY_CONTROL_BINDING_H__ #include +#include G_BEGIN_DECLS @@ -69,10 +70,10 @@ struct _GstProxyControlBindingClass gpointer _padding[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_proxy_control_binding_get_type (void); -GST_EXPORT +GST_CONTROLLER_API GstControlBinding * gst_proxy_control_binding_new (GstObject * object, const gchar * property_name, GstObject * ref_object, diff --git a/libs/gst/controller/gsttimedvaluecontrolsource.h b/libs/gst/controller/gsttimedvaluecontrolsource.h index d480fa3..65ba373 100644 --- a/libs/gst/controller/gsttimedvaluecontrolsource.h +++ b/libs/gst/controller/gsttimedvaluecontrolsource.h @@ -27,8 +27,7 @@ #include #include - -#include +#include G_BEGIN_DECLS @@ -81,7 +80,7 @@ struct _GstControlPoint } cache; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_control_point_get_type (void); /** @@ -116,42 +115,42 @@ struct _GstTimedValueControlSourceClass { #define GST_TIMED_VALUE_CONTROL_SOURCE_UNLOCK(o) \ g_mutex_unlock(&((GstTimedValueControlSource *)o)->lock) -GST_EXPORT +GST_CONTROLLER_API GType gst_timed_value_control_source_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GSequenceIter * gst_timed_value_control_source_find_control_point_iter ( GstTimedValueControlSource * self, GstClockTime timestamp); -GST_EXPORT +GST_CONTROLLER_API gboolean gst_timed_value_control_source_set (GstTimedValueControlSource * self, GstClockTime timestamp, const gdouble value); -GST_EXPORT +GST_CONTROLLER_API gboolean gst_timed_value_control_source_set_from_list (GstTimedValueControlSource * self, const GSList * timedvalues); -GST_EXPORT +GST_CONTROLLER_API gboolean gst_timed_value_control_source_unset (GstTimedValueControlSource * self, GstClockTime timestamp); -GST_EXPORT +GST_CONTROLLER_API void gst_timed_value_control_source_unset_all (GstTimedValueControlSource *self); -GST_EXPORT +GST_CONTROLLER_API GList * gst_timed_value_control_source_get_all (GstTimedValueControlSource * self); -GST_EXPORT +GST_CONTROLLER_API gint gst_timed_value_control_source_get_count (GstTimedValueControlSource * self); -GST_EXPORT +GST_CONTROLLER_API void gst_timed_value_control_invalidate_cache (GstTimedValueControlSource * self); -GST_EXPORT +GST_CONTROLLER_API void gst_control_point_free (GstControlPoint * cp); -GST_EXPORT +GST_CONTROLLER_API GstControlPoint * gst_control_point_copy (GstControlPoint * cp); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/libs/gst/controller/gsttriggercontrolsource.h b/libs/gst/controller/gsttriggercontrolsource.h index dde3df1..f98bed7 100644 --- a/libs/gst/controller/gsttriggercontrolsource.h +++ b/libs/gst/controller/gsttriggercontrolsource.h @@ -72,12 +72,12 @@ struct _GstTriggerControlSourceClass { gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_CONTROLLER_API GType gst_trigger_control_source_get_type (void); /* Functions */ -GST_EXPORT +GST_CONTROLLER_API GstControlSource *gst_trigger_control_source_new (void); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/libs/gst/controller/meson.build b/libs/gst/controller/meson.build index d4b2e36..1645c9e 100644 --- a/libs/gst/controller/meson.build +++ b/libs/gst/controller/meson.build @@ -21,6 +21,7 @@ gst_controller_headers = controller_mkenum_headers + [ 'gstproxycontrolbinding.h', 'gsttriggercontrolsource.h', 'gstlfocontrolsource.h', + 'controller-prelude.h', 'controller.h', ] install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/') -- 2.7.4