Commit graph

180 commits

Author SHA1 Message Date
Mathieu Duponchelle f9c0367619 mpegtssection: events don't necessarily have a structure 2019-05-30 17:20:12 +02:00
Mathieu Duponchelle 09749192d8 mpegts: extend support for ATSC tables
Adds constructors for the following sections:

STT: System Time Table
MGT: Master Guide Table
RRT: Rating Region Table

Also adds parsing code for RRT
2019-05-30 13:53:05 +00:00
Thibault Saunier 47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Thibault Saunier 7fe3f36ac8 Minor documentation fixes 2019-05-13 11:36:27 -04:00
Russel Winder 0341af78a4 mpegts: Register a number of new boxed types to support auto generation of bindings. 2018-11-08 08:15:41 +00:00
Russel Winder 4d67ecca33 mpegts: remove insignificant trailing whitespace from lines of files in the MPEG-TS library. 2018-11-05 16:18:26 +00:00
Russel Winder dcad6d1031 mpegts: Register a boxed type for GstMpegtsContent 2018-11-01 14:39:36 +02:00
Sebastian Dröge 77398f1c27 mpegts: Use gst and gst_mpegts as symbol prefix in the meson build
Just like we do in the autotools build.
2018-10-28 11:07:47 +00:00
Sebastian Dröge ff47ef9ab9 mpegts: Add boxed type for DVB CableDeliverySystem descriptor 2018-10-27 13:59:57 +01: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
Bastian Köcher c73abb0c71 meson: fix install dir for generated header files
Nixos installs into a non-standard includedir, so need
to take account of the 'includedir' option instead of
just hard-coding 'include' here.

https://bugzilla.gnome.org/show_bug.cgi?id=794856
2018-08-10 12:57:47 +01:00
Russel Winder bfe26464c9 mpegts: Add GIR generation array anotations
For function parameters that are known to be arrays.

https://bugzilla.gnome.org/show_bug.cgi?id=796221
2018-05-19 11:06:14 +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
Stefan Ringel 52372a25c7 docs: mpegts: add atsc docs
https://bugzilla.gnome.org/show_bug.cgi?id=730940
2018-04-23 16:32:49 +02:00
Tim-Philipp Müller db6374b308 meson: mpegts: make internal mpegts lib dep depend on the enumtypes header 2018-04-03 14:04:15 +01:00
Alessandro Decina f49134095c meson: use gnome.mkenums_simple() to generate enumtypes files
Means we no longer need our custom scripts, nor template files.
2018-03-22 14:34:05 +00:00
Tim-Philipp Müller 3eb033bba2 mpegts: GST_EXPORT -> GST_MPEGTS_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:47:03 +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 b77948d511 mpegts: make accidentally exported debug category symbol private
Was never in header files, was just exported by accident because
of the gst_ prefix of the variable name.
2017-08-11 14:39:07 +01:00
Tim-Philipp Müller 659fa31cf9 mpegts: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Thibault Saunier 78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Vincent Penquerc'h 9eab67a4af mpegts: fix invalid memory access in language descriptor
Also add a couple sanity asserts/returns

https://bugzilla.gnome.org/show_bug.cgi?id=781024
2017-04-09 11:16:37 +03:00
Thibault Saunier cea4346d84 meson: Build GIR files 2017-01-23 12:48:53 -03:00
Sebastian Dröge 57bb47f3f7 mpegtssection: Fix off-by-one in PMT parsing 2016-11-28 20:05:02 +02:00
Sebastian Dröge 911a6083c8 mpegtssection: Don't assert if the given section length is longer than the PMT actually is
Instead error out cleanly and just assert that we didn't read more than
the available data.
2016-11-28 19:53:46 +02:00
Edward Hervey d58f668ece mpegtssection: Add more section size checks
The smallest section ever needs to be at least 3 bytes (i.e. just the short
header).
Non-short headers need to be at least 11 bytes long (3 for the minimum header,
5 for the non-short header, and 4 for the CRC).

https://bugzilla.gnome.org/show_bug.cgi?id=775048
2016-11-26 10:46:08 +01:00
Edward Hervey 7b12593cce mpegtssection: Fix PAT parsing
Use the estimated number of programs for parsing. Avoids over-reading.

https://bugzilla.gnome.org/show_bug.cgi?id=775120
2016-11-26 10:45:52 +01:00
Edward Hervey d1fa342b71 mpegtssection: Don't free empty streams
Also avoids a useless assertion
2016-11-24 11:15:22 +01:00
Dongil Park 324b3873c8 mpegts: fix typo in GstMpegtsDescriptor
https://bugzilla.gnome.org/show_bug.cgi?id=774132
2016-11-10 10:07:59 +00:00
Wonchul Lee 69b866326e tsdemux: Add conditions to identify ATSC EAC3
https://bugzilla.gnome.org/show_bug.cgi?id=770528
2016-10-03 15:14:54 -04:00
Thibault Saunier 50473d77cc meson: Make mpegts lib build when using subprojects
The headers passed as parametter are relative to the build dir
basically "../subproject/gst-plugins-bad/gst-libs/gst/mpegts/XXX.h"
but that does not match what is needed at build time when building as
subproject, also we always add current dir as include_dir so we are
safe including directly.

And link mpegtsdemux against the 'math' library as it is needed.
2016-08-25 15:17:17 -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
Thiago Santos 9cc00bf2c9 mpegtsmux: write language descriptor when language is available
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
2016-04-26 23:45:34 -03: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
Sebastian Dröge ce61a754d8 mpegtsdescriptor: Add API for creating extended descriptors and fix writing them
https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Jesper Larsen 355439206d mpegts: return early if packetizing short section
Short sections have 3 bytes of common header, while other sections
have 8 bytes of common header. If packetizing common header of short
section, we should stop after the first 3 bytes.

https://bugzilla.gnome.org/show_bug.cgi?id=735653
2015-06-12 19:21:51 +01: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
Arun Raghavan 70ed4fd438 mpegts: Fix a compiler warning
Causes the following warning on clang:

gst-dvb-section.c:567:36: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
          descriptors_loop_length, end - 4 - data);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
2015-02-24 19:06:30 +05:30
Julien Isorce 857456b7ba mpegts: fix some compiler warnings
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1

"warning: comparison is always true due to limited
range of data type"

https://bugzilla.gnome.org/show_bug.cgi?id=740674
2014-11-25 10:23:43 +01:00
Ramprakash Jelari f0e418b629 dvbsection: Fix format string compiler warning 2014-11-24 12:51:34 +01:00
Ramprakash Jelari cbe46c0373 mpegtsdescriptor: Fix format string compiler warning
gstmpegtsdescriptor.c:778:16: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
2014-11-24 12:32:37 +01:00
Luis de Bethencourt f76d1a2514 mpegts: remove storage of never used values
Both _parse_atsc_mgt() and  _parse_atsc_vct () change the value of the variable
data just before returning. The new value is never used since data is a pointer
declared at the beginning of the function and going out of scope just after the
new value is stored.

https://bugzilla.gnome.org/show_bug.cgi?id=739404
2014-10-30 23:19:59 +00:00
Felix Schwarz a2b82ba541 mpegts: fix typos in comments
https://bugzilla.gnome.org/show_bug.cgi?id=738072
2014-10-07 13:11:13 +01:00
Reynaldo H. Verdejo Pinochet 8059cf6567 mpegts: fix typo in GstMpegtsExtendedEventDescriptor doc 2014-10-03 23:27:03 -03:00
Edward Hervey 9e73b487c4 mpegts: Add parsing for CA descriptor (0x05)
https://bugzilla.gnome.org/show_bug.cgi?id=732986
2014-07-11 08:32:06 +02:00