diff options
m--------- | common | 0 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | gst/gstconfig.h.in | 2 | ||||
-rw-r--r-- | libs/gst/base/base-prelude.h | 2 | ||||
-rw-r--r-- | libs/gst/base/gstdataqueue.c | 3 | ||||
-rw-r--r-- | libs/gst/base/gstflowcombiner.c | 3 | ||||
-rw-r--r-- | libs/gst/base/gstqueuearray.c | 4 | ||||
-rw-r--r-- | libs/gst/check/check-prelude.h | 2 | ||||
-rw-r--r-- | libs/gst/check/gstbufferstraw.c | 3 | ||||
-rw-r--r-- | libs/gst/check/gstconsistencychecker.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/controller-prelude.h | 2 | ||||
-rw-r--r-- | libs/gst/controller/gstargbcontrolbinding.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/gstdirectcontrolbinding.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/gstinterpolationcontrolsource.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/gstlfocontrolsource.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/gsttimedvaluecontrolsource.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/gsttriggercontrolsource.c | 3 | ||||
-rw-r--r-- | libs/gst/controller/meson.build | 1 | ||||
-rw-r--r-- | libs/gst/net/gstnetaddressmeta.c | 3 | ||||
-rw-r--r-- | libs/gst/net/gstnetcontrolmessagemeta.c | 3 | ||||
-rw-r--r-- | libs/gst/net/net-prelude.h | 2 | ||||
-rw-r--r-- | meson.build | 16 |
22 files changed, 65 insertions, 10 deletions
diff --git a/common b/common -Subproject ed78bee437dcbe22e6eef0031d9a29d157c0461 +Subproject cd1dee06bf07f094677d0cf3eea4a2e8c2636b2 diff --git a/configure.ac b/configure.ac index 79a2b8c8fc..93a6755145 100644 --- a/configure.ac +++ b/configure.ac @@ -892,7 +892,13 @@ AC_ARG_WITH([memory-alignment], dnl Symbol visibility VISIBILITY_CFLAGS="" -AS_COMPILER_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"]) +AS_COMPILER_FLAG([-fvisibility=hidden], [ + VISIBILITY_CFLAGS="-fvisibility=hidden" + AC_DEFINE(GST_API_EXPORT, [extern __attribute__ ((visibility ("default")))], [public symbol export define]) +], [ + VISIBILITY_CFLAGS="" + AC_DEFINE(GST_API_EXPORT, [extern], [public symbol export define]) +]) AC_SUBST(VISIBILITY_CFLAGS) dnl Check for -Bsymbolic-functions linker flag used to avoid diff --git a/gst/gstconfig.h.in b/gst/gstconfig.h.in index a0f57710cd..41bbdde0eb 100644 --- a/gst/gstconfig.h.in +++ b/gst/gstconfig.h.in @@ -163,7 +163,7 @@ #ifndef GST_API # ifdef BUILDING_GST -#define GST_API GST_EXPORT +# define GST_API GST_API_EXPORT /* from config.h */ # else # define GST_API GST_API_IMPORT # endif diff --git a/libs/gst/base/base-prelude.h b/libs/gst/base/base-prelude.h index ae98d38d19..87defde34e 100644 --- a/libs/gst/base/base-prelude.h +++ b/libs/gst/base/base-prelude.h @@ -26,7 +26,7 @@ #ifndef GST_BASE_API #ifdef BUILDING_GST_BASE -#define GST_BASE_API GST_EXPORT +#define GST_BASE_API GST_API_EXPORT /* from config.h */ #else #define GST_BASE_API GST_API_IMPORT #endif diff --git a/libs/gst/base/gstdataqueue.c b/libs/gst/base/gstdataqueue.c index 7e4d71e1ad..d6479bb966 100644 --- a/libs/gst/base/gstdataqueue.c +++ b/libs/gst/base/gstdataqueue.c @@ -28,6 +28,9 @@ * also provides size-related functionality. This object should be used for * any #GstElement that wishes to provide some sort of queueing functionality. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include "string.h" diff --git a/libs/gst/base/gstflowcombiner.c b/libs/gst/base/gstflowcombiner.c index 831e20257c..8b64a469c7 100644 --- a/libs/gst/base/gstflowcombiner.c +++ b/libs/gst/base/gstflowcombiner.c @@ -60,6 +60,9 @@ * * Since: 1.4 */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include "gstflowcombiner.h" diff --git a/libs/gst/base/gstqueuearray.c b/libs/gst/base/gstqueuearray.c index de8e0b4d85..353921c7c5 100644 --- a/libs/gst/base/gstqueuearray.c +++ b/libs/gst/base/gstqueuearray.c @@ -29,7 +29,9 @@ * based on an array instead of linked lists. This reduces the overhead * caused by memory management by a large factor. */ - +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <gst/gst.h> diff --git a/libs/gst/check/check-prelude.h b/libs/gst/check/check-prelude.h index f7faf83fd7..0fc272598b 100644 --- a/libs/gst/check/check-prelude.h +++ b/libs/gst/check/check-prelude.h @@ -26,7 +26,7 @@ #ifndef GST_CHECK_API #ifdef BUILDING_GST_CHECK -#define GST_CHECK_API GST_EXPORT +#define GST_CHECK_API GST_API_EXPORT /* from config.h */ #else #define GST_CHECK_API GST_API_IMPORT #endif diff --git a/libs/gst/check/gstbufferstraw.c b/libs/gst/check/gstbufferstraw.c index 93a2c37639..893ae6a4f1 100644 --- a/libs/gst/check/gstbufferstraw.c +++ b/libs/gst/check/gstbufferstraw.c @@ -28,6 +28,9 @@ * These macros and functions are for internal use of the unit tests found * inside the 'check' directories of various GStreamer packages. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstbufferstraw.h" diff --git a/libs/gst/check/gstconsistencychecker.c b/libs/gst/check/gstconsistencychecker.c index cf1dbf70a0..aff1875edb 100644 --- a/libs/gst/check/gstconsistencychecker.c +++ b/libs/gst/check/gstconsistencychecker.c @@ -29,6 +29,9 @@ * These macros and functions are for internal use of the unit tests found * inside the 'check' directories of various GStreamer packages. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstconsistencychecker.h" diff --git a/libs/gst/controller/controller-prelude.h b/libs/gst/controller/controller-prelude.h index c7d278cdc8..cd7f0c9196 100644 --- a/libs/gst/controller/controller-prelude.h +++ b/libs/gst/controller/controller-prelude.h @@ -26,7 +26,7 @@ #ifndef GST_CONTROLLER_API #ifdef BUILDING_GST_CONTROLLER -#define GST_CONTROLLER_API GST_EXPORT +#define GST_CONTROLLER_API GST_API_EXPORT /* from config.h */ #else #define GST_CONTROLLER_API GST_API_IMPORT #endif diff --git a/libs/gst/controller/gstargbcontrolbinding.c b/libs/gst/controller/gstargbcontrolbinding.c index 6fe79e310c..b8014a0db9 100644 --- a/libs/gst/controller/gstargbcontrolbinding.c +++ b/libs/gst/controller/gstargbcontrolbinding.c @@ -29,6 +29,9 @@ * gobject properties representing a color. A control value of 0.0 will turn the * color component off and a value of 1.0 will be the color level. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <glib-object.h> #include <gst/gst.h> diff --git a/libs/gst/controller/gstdirectcontrolbinding.c b/libs/gst/controller/gstdirectcontrolbinding.c index 9e5955d1b5..bcc872e500 100644 --- a/libs/gst/controller/gstdirectcontrolbinding.c +++ b/libs/gst/controller/gstdirectcontrolbinding.c @@ -31,6 +31,9 @@ * will be clipped. An absolute control binding will not do any value * transformations. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <glib-object.h> #include <gst/gst.h> diff --git a/libs/gst/controller/gstinterpolationcontrolsource.c b/libs/gst/controller/gstinterpolationcontrolsource.c index 77b8132591..c0b6c86c55 100644 --- a/libs/gst/controller/gstinterpolationcontrolsource.c +++ b/libs/gst/controller/gstinterpolationcontrolsource.c @@ -36,6 +36,9 @@ * All functions are MT-safe. * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <glib-object.h> #include <gst/gst.h> diff --git a/libs/gst/controller/gstlfocontrolsource.c b/libs/gst/controller/gstlfocontrolsource.c index 2cea4f80d5..1706efddfc 100644 --- a/libs/gst/controller/gstlfocontrolsource.c +++ b/libs/gst/controller/gstlfocontrolsource.c @@ -35,6 +35,9 @@ * * All functions are MT-safe. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <float.h> diff --git a/libs/gst/controller/gsttimedvaluecontrolsource.c b/libs/gst/controller/gsttimedvaluecontrolsource.c index 35690f3ba1..66c82a9a34 100644 --- a/libs/gst/controller/gsttimedvaluecontrolsource.c +++ b/libs/gst/controller/gsttimedvaluecontrolsource.c @@ -35,6 +35,9 @@ * All functions are MT-safe. * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <glib-object.h> #include <gst/gst.h> diff --git a/libs/gst/controller/gsttriggercontrolsource.c b/libs/gst/controller/gsttriggercontrolsource.c index 6415c0eb4c..0b68cf1d5a 100644 --- a/libs/gst/controller/gsttriggercontrolsource.c +++ b/libs/gst/controller/gsttriggercontrolsource.c @@ -36,6 +36,9 @@ * * All functions are MT-safe. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <glib-object.h> #include <gst/gst.h> diff --git a/libs/gst/controller/meson.build b/libs/gst/controller/meson.build index 93a5beccc4..e592b8193a 100644 --- a/libs/gst/controller/meson.build +++ b/libs/gst/controller/meson.build @@ -29,6 +29,7 @@ install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/' controller_enums = gnome.mkenums_simple('controller-enumtypes', sources : controller_mkenum_headers, header_prefix : '#include <gst/controller/controller-prelude.h>', + body_prefix : '#include "config.h"', decorator : 'GST_CONTROLLER_API', install_header : true, install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/controller')) diff --git a/libs/gst/net/gstnetaddressmeta.c b/libs/gst/net/gstnetaddressmeta.c index de98a1c2f9..262c5788fc 100644 --- a/libs/gst/net/gstnetaddressmeta.c +++ b/libs/gst/net/gstnetaddressmeta.c @@ -26,6 +26,9 @@ * in a #GstBuffer so that it network elements can track the to and from address * of the buffer. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> diff --git a/libs/gst/net/gstnetcontrolmessagemeta.c b/libs/gst/net/gstnetcontrolmessagemeta.c index d6cc525482..4f248345aa 100644 --- a/libs/gst/net/gstnetcontrolmessagemeta.c +++ b/libs/gst/net/gstnetcontrolmessagemeta.c @@ -28,6 +28,9 @@ * sending and receiving ancillary data such as unix credentials (See * #GUnixCredentialsMessage) and Unix file descriptions (See #GUnixFDMessage). */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> diff --git a/libs/gst/net/net-prelude.h b/libs/gst/net/net-prelude.h index e0cf2f8960..47224fe048 100644 --- a/libs/gst/net/net-prelude.h +++ b/libs/gst/net/net-prelude.h @@ -26,7 +26,7 @@ #ifndef GST_NET_API #ifdef BUILDING_GST_NET -#define GST_NET_API GST_EXPORT +#define GST_NET_API GST_API_EXPORT /* from config.h */ #else #define GST_NET_API GST_API_IMPORT #endif diff --git a/meson.build b/meson.build index a36ce455ef..6e8b348787 100644 --- a/meson.build +++ b/meson.build @@ -33,6 +33,8 @@ helpers_install_dir = join_paths(libexecdir, 'gstreamer-1.0') cc = meson.get_compiler('c') +cdata = configuration_data() + # Ignore several spurious warnings for things gstreamer does very commonly # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once @@ -51,11 +53,20 @@ elif cc.has_link_argument('-Wl,-Bsymbolic-functions') endif # Symbol visibility -have_visibility_hidden = cc.has_argument('-fvisibility=hidden') -if have_visibility_hidden +have_visibility_hidden = false +if cc.get_id() == 'msvc' + export_define = '__declspec(dllexport) extern' +elif cc.has_argument('-fvisibility=hidden') add_project_arguments('-fvisibility=hidden', language: 'c') + export_define = 'extern __attribute__ ((visibility ("default")))' + have_visibility_hidden = true +else + export_define = 'extern' endif +# Passing this through the command line would be too messy +cdata.set('GST_API_EXPORT', export_define) + # Disable strict aliasing if cc.has_argument('-fno-strict-aliasing') add_project_arguments('-fno-strict-aliasing', language: 'c') @@ -85,7 +96,6 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev) add_project_arguments('-DG_DISABLE_CHECKS', language: 'c') endif -cdata = configuration_data() cdata.set_quoted('GST_API_VERSION', apiversion) cdata.set_quoted('GST_DATADIR', join_paths(prefix, get_option('datadir'))) cdata.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir'))) |