Commit graph

541 commits

Author SHA1 Message Date
Thibault Saunier
a724f9ddfb encodebin: Ensure that a single segment is pushed into encoders
Following the [design document] encodebin needs to handle sources that
output multiple streams, for that purpose and to make it simpler,
we ensure that a single segment is outputted to the encoders by using
an `identity single-segment=true` at the beginning of streams chains.

Added API to enable or disable the use of that new feature.
Added support for the encoding profile parser for that new property,
keeping backward compatibility

[design document]: https://gstreamer.freedesktop.org/documentation/additional/design/encoding.html?gi-language=c#rendering-timelines
2019-11-05 18:03:09 +00:00
Tim-Philipp Müller
289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Tim-Philipp Müller
50aeeec15b pbutils: add description for CineForm codec 2019-10-08 19:38:14 +01:00
Thibault Saunier
909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Mathieu Duponchelle
97426fd52e encoding-target: fix SECTION comment syntax
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/658
2019-08-27 14:25:34 +00:00
Niels De Graef
0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Seungha Yang
3f0e1f937d codec-utils: Add parsing H265 range extensions profiles
Add support all h265 profiles defined by ITU-T H.264 (02/2018) revision
2019-06-15 17:17:36 -04:00
Thibault Saunier
e0ebd29a17 discoverer: Plug some leaks in the cache loading path 2019-06-07 22:44:31 -04:00
Mathieu Duponchelle
d6847fe04d discoverer: unref "next" variant when parsing from variant 2019-06-05 20:51:47 +00:00
Niels De Graef
93daa1435a 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). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means we
no longer need the macro there, but for most types in base/gst-libs we
don't want to break ABI, which means it's better to just keep it like it
is (and use the `#ifdef` instead).
2019-06-04 20:31:09 -04:00
Mathieu Duponchelle
d98835fdef doc: remove xml from comments 2019-05-30 01:12:59 +02:00
Thibault Saunier
287897e465 doc: Fix some gtk-doc comments 2019-05-13 11:34:08 -04:00
Thibault Saunier
27ba8d24ec doc: Port to hotdoc 2019-05-13 11:34:08 -04:00
Thibault Saunier
685731e989 meson: Add variables for gir files
And flatten list of sources for dependencies
2019-05-13 10:19:22 -04:00
Thibault Saunier
1a2fe0e6e4 docs: Enhance GstEncodingProfile and GstEncodingTarget doc 2019-05-13 10:19:22 -04:00
Sebastian Dröge
03a85de734 libs: Fix various Since markers 2019-04-23 12:28:26 +00:00
Thibault Saunier
4320a31bd9 encoding-target: Lower down some debugging
We do try to load target with 'random' string internally to load EncodingProfiles
2019-04-09 17:20:01 +00:00
Aaron Boxer
6ade19cc15 discoverer: async_timeout_cb: don't clean up timeout_source
discoverer_collect() already does this. So, the second
unref triggers an assert.
2019-04-01 18:35:06 +00:00
Nicolas Dufresne
3ee89d6e3c Remove some left over 0.10 references 2019-03-21 17:22:24 +00:00
Josep Torra
a1cc9ea6a9 discoverer: add casts to avoid warnings in osx builds
Fix the following warnings by adding casts.

gstdiscoverer.c:1801:17: error: format specifies type 'unsigned long' but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);
                ^~~~~~~~~~~~~~~~~~~
gstdiscoverer.c:1801:38: error: format specifies type 'long long' but the argument has type '__darwin_time_t' (aka 'long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/570
2019-03-21 17:21:30 +01:00
Thibault Saunier
7bcd72f5b6 Revert "Revert "discoverer: Serialize/load "next" StreamInfo in GVariants""
This reverts commit 747f5a75c3.

This was never meant to be reverted in the first place but sliped in
during developement
2019-03-07 19:52:44 -03:00
Thibault Saunier
747f5a75c3 Revert "discoverer: Serialize/load "next" StreamInfo in GVariants"
This reverts commit 6ca357f5b67590c694a95013f5eb5fdd04cf46a9.
2019-03-07 20:59:29 +00:00
Thibault Saunier
19c86b4494 discoverer: Remove padding from private headers 2019-03-07 20:59:29 +00:00
Thibault Saunier
c8eee6f0c6 dicoverer: Do not add container infos to the stream list
They are not added on actual discovery

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier
4014995d0c discoverer: Serialize/load "next" StreamInfo in GVariants
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier
54920276b0 discoverer: Implement GstDiscovererInfo caching
This uses the gst_discoverer_info_from/to_variant API and saves
the variants on disc (in the user data cache dir) allowing much
faster retrieval of the information after the cache has been built.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Tim-Philipp Müller
79365f9b41 pbutils: add description for AV1 codec
Fixes #558
2019-02-16 15:29:57 +00:00
Seungha Yang
b32b59ce76 discoverer: Hold GSource object instead of source id
g_source_remove() works only for a GSource which was attached
to default GMainContext, but the GSource might be attached to
custom context depending on how gst_discoverer_start() was called.

Whatever the attached context was, g_source_destroy() can clean it up.
2019-01-28 18:53:39 +09:00
Alex Ashley
5767d65321 codec-utils: support extension audio object type and sample rate
ISO 14496-3 defines that audioObjectType 5 is a special case that
indicates SBR is present and that an additional field has to be
parsed to find the true audioObjectType.

There are two ways of signaling SBR within an AAC stream - implicit
and explicit (see [1] section 4.2). When explicit signaling is used,
the presence of SBR data is signaled by means of the SBR
audioObjectType in the AudioSpecificConfig data.

Normally the sample rate is specified by an index into a
table of common sample rates. However index 0x0f is a special case
that indicates that the next 24 bits contain the real sample rate.

[1] https://www.telosalliance.com/support/A-closer-look-into-MPEG-4-High-Efficiency-AAC

Fixes #39
2019-01-11 17:41:15 +05:30
Edward Hervey
f9176b8288 codec-utils: Don't leak bytewriter data
In error cases, don't forget to reset it.
2018-12-17 09:27:25 +01:00
Thiago Santos
6be312a759 encoding-profile: set_restriction should accept null as valid
It was checking for GST_IS_CAPS only and that would fail if the new
restriction caps was NULL and its documentation says it accepts NULL as
valid input.
2018-10-01 18:05:39 -07:00
Tim-Philipp Müller
dc29bc4e13 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 08:45:34 +01:00
Sebastian Dröge
14031f1c63 discoverer: Consider closedcaption/ as subtitles and improve subtitle caps detection
Generally all subtitle/, subpicture/, text/, closedcaption/ and
application/x-subtitle caps instead of hardcoding a small set of caps.

https://bugzilla.gnome.org/show_bug.cgi?id=797072
2018-09-04 11:59:46 +03:00
Nirbheek Chauhan
a9cab426d0 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:40:43 +05:30
Tim-Philipp Müller
ca15315565 gst-libs: include config.h in all source files
This will be needed later when we get our export define from config.h
2018-08-13 09:23:34 +01:00
Tim-Philipp Müller
f548546d41 pbutils, rtsp: fix deprecation guards
Function body must only be removed if compiling with
GST_REMOVE_DEPRECATED. Function declaration must not
be skipped if GST_DISABLE_DEPRECATED is defined, since
it contains our export decorator and we wouldn't export
the symbol as public API any more then since we compile
with GST_DISABLE_DEPRECATED.
2018-08-13 00:24:50 +01:00
Bastian Köcher
efa9bdccf9 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:43:38 +01:00
Tim-Philipp Müller
511a8d7ddd pbutils: Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-23 22:08:16 +02:00
Antoine Jacoutot
c765649505 libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2018-05-18 13:41:25 +02:00
Thibault Saunier
8600fc3148 pbutils: Avoid assertion describing raw audio caps without format
We used to get:

    gst_audio_format_from_string: assertion 'format != NULL' failed
2018-05-01 21:15:25 +02:00
Thibault Saunier
77b23ea0ac encoding-profile: Fix deserialization of a single profile
Instead of trying to guess what profile to build, just get the possible
elements to use with the specified caps and determine the
EncodingProfile from it.

https://bugzilla.gnome.org/show_bug.cgi?id=795490
2018-05-01 21:15:25 +02:00
Mark Nauwelaerts
1beff3bde5 pbutils: fix some GIR annotations
Mostly related to out and array parameters
2018-04-23 19:33:19 +02:00
Thibault Saunier
59eacaa966 encoding-profile: Handle escaped '\:' in caps describing profiles
Otherwise it won't be possible to specify some profiles such as

    video/x-h264,profile=(string)high-4:4:4

With this patch, we can do

    video/x-h264,profile=(string)high-4\:4\:4
2018-04-20 11:22:41 -03:00
Sebastian Dröge
5e441e2197 audiovisualizer: Only fixate pixel-aspect-ratio if the field exists
It's optional.
2018-04-11 21:40:58 +02:00
Sebastian Dröge
cfb1a7f6e7 audiovisualizer: Fixate pixel-aspect-ratio to the closest value to 1/1 2018-04-10 21:18:37 +02:00
Edward Hervey
43254a2196 pbutils: Add Closed Caption caps description
https://bugzilla.gnome.org/show_bug.cgi?id=794901
2018-04-09 15:15:24 +02:00
Edward Hervey
22c9e5f7c1 libs: Documentation cleanup
* Fix wrong naming, wrong types and typos
* Add missing sections
* Add missing documentation for entries
* Explicitely mark private structure entries
* Remove items that never existed
2018-04-02 08:53:28 +02:00
Edward Hervey
d69fa0c78e libs: Add deprecation guard
Those functions have been marked as deprecated
2018-04-02 08:53:28 +02:00
Thiago Santos
dc527cac62 encoding-profile: fix gi annotation for gst_encoding_profile_find 2018-03-25 14:05:31 -07:00
Alessandro Decina
345aa2cd9e meson: libs: use gnome.mkenums_simple() to generate enumtypes files
This way we no longer need custom wrapper scripts or template files.
2018-03-22 13:15:35 +00:00