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
Adds a new function to mpegts lib to create a iso639 language
descriptor from a language and use it in mpegtsmux to add
a language descriptor to audio streams that have a language set.
https://bugzilla.gnome.org/show_bug.cgi?id=763647
It was previously a mix and match of both variants, introducing just too much
confusion.
The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)
The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
While it was a great idea, various g-i based bindings don't support
GArray with entries greater than sizeof(gpointer) :(
So let's just make everybody happy by just using GPtrArray.
And since we're breaking the API, also rename the various descriptor fields
to no longer have the descriptor_ prefix.
It does cost a bit more in terms of memory/cpu usage, but makes it usable
from bindings.
* Add a base page for the library
* Add pages for the base MPEG-TS section and descriptors
* Add pages for the known variants
* Add documentation on more fields/sections/types
* Remove some fixmes that were ... fixed
* In order to avoid future clashing between table_id for the various
mpeg-ts variants, use different enums.
* In order to keep everything clean(ish) and allow for cleaner growth,
split into different files (will need the same for descriptors later)
* Also ... implement free functions for all table types :)
Sorry for this :( But this makes it more in sync with expected type
naming in gobject (i.e. CamelCase and not CamelMAYBECase).
Also split descriptor type enums into the different variants:
* ISO H.222.0 / 13818-1 (i.e. standard mpeg-ts)
* DVB
* ATSC
* ISDB
* miscellaneous
This will avoid future clashes when specs use the same descriptor type
Exposes various MPEG-TS (ISO/IEC 13818-1) and DVB (EN 300 468) Section
Information as well as descriptors for usage by plugins and applications.
This replaces entirely the old GstStructure-based system for conveying
mpeg-ts information to applications and other plugins.
Parsing and validation is done on a "when-needed" basis. This ensures
the minimal overhead for elements and applications creating and using
sections and descriptors.
Since all information is made available, this also allows applications
to parse custom sections and descriptors.
Right now the library is targeted towards parsing, but the structures
could be used in the future to allow applications to create and inject
sections and descriptors (for usage by various mpeg-ts elements).
https://bugzilla.gnome.org/show_bug.cgi?id=702724