Commit graph

25 commits

Author SHA1 Message Date
Niels De Graef
7af1a4566f Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it).
2019-06-05 08:12:10 +02:00
Tim-Philipp Müller
b6411ae74c libs: fix API export/import and 'inconsistent linkage' on MSVC
For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

While we're at it, add new GST_API_EXPORT in config.h and use
that for GST_*_API decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 14:45:56 +01:00
Nirbheek Chauhan
cea5e3fcdb meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:41:00 +05:30
Tim-Philipp Müller
86c1a7b4ad libs: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:19:17 +02:00
Antoine Jacoutot
5c7719ea74 libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2018-05-18 14:49:53 +02:00
Tim-Philipp Müller
42491f0d11 insertbin: GST_EXPORT -> GST_INSERT_BIN_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.
2018-03-13 12:36:26 +00:00
Havard Graff
22f0f11abf meson: remove vs_module_defs
The GST_EXPORT should handle it.
2017-10-05 13:57:48 +01:00
Rico Tzschichholz
4a60566999 meson: Fix namespace and add some missing args in the gir generation 2017-10-05 13:56:46 +01:00
Tim-Philipp Müller
6f47205321 insertbin: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Thibault Saunier
cea4346d84 meson: Build GIR files 2017-01-23 12:48:53 -03:00
Nirbheek Chauhan
42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Tim-Philipp Müller
db90f4686f g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:55:11 +01:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Tim-Philipp Müller
e317a350bc libs: g-i: fix init section to avoid compiler warnings
..GstPlayer-1.0.c: In function ‘main’:
..GstPlayer-1.0.c:587:3: warning: implicit declaration of function ‘gst_init’

https://bugzilla.gnome.org/show_bug.cgi?id=760090
2016-01-19 08:40:35 +00:00
Xavier Claessens
598ddaee72 bad: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 14:45:38 -05:00
Reynaldo H. Verdejo Pinochet
c564a043d1 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 00:20:01 -08:00
Tim-Philipp Müller
699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Edward Hervey
0360a62135 introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 15:42:03 +02:00
Jan Schmidt
f150cf2d2e Remove a bunch of silly ';;' typos at the end of lines 2015-03-12 01:33:03 +11:00
Olivier Crête
484f0a0cd3 insertbin: Add doc for the ignored user-data in action signals 2014-11-03 20:45:03 -05:00
Olivier Crête
d0524c0579 insertbin: Annotate callback scopes 2013-05-15 20:03:30 -04:00
Tim-Philipp Müller
f8139b2b99 insertbin: mark as unstable API 2013-02-14 09:03:28 +00:00
Tim-Philipp Müller
214d7e0619 insertbin: fix up gtk-doc chunk and add since markers 2013-02-14 09:02:53 +00:00
Tim-Philipp Müller
cf695c6da9 insertbin, tests: fix printf format compiler warnings 2013-01-25 12:25:15 +00:00
Olivier Crête
d1023646f9 insertbin: Add bin to dynamically insert elements in a running pipeline
This element automatically links in any element added using it's
action signals. These elements must have a single source pad and a single
sink pad.
2013-01-23 21:13:03 -05:00