Commit graph

565 commits

Author SHA1 Message Date
Marijn Suijten
abb026ec6a gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Thibault Saunier
dc4c976727 pbutils: Add support for muxing sinks usage in encoding profiles 2020-11-30 15:44:53 -03:00
David Keijser
f3dc83d285 Fix segfault when using invalid encoding profile
Trying to use gst_encoding_profile_get_file_extension on a
GstEncodingProfile with a cap containing a typo would result in strcmp
being called with NULL. Instead use g_strcmp0 that handles this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/929>
2020-11-10 23:26:39 +01:00
Xavier Claessens
a28a75652e Meson: Use pkg-config generator 2020-10-23 11:19:11 -04:00
Marcin Kolny
d74b9f56fc encoding-profile: minor fix in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/212>
2020-08-25 07:29:33 +00:00
Nicolas Dufresne
6500a76bfb pbutils: Add latest H.264 level values
The spec now list 6, 6.1 and 6.2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/786>
2020-08-11 17:15:50 -04:00
Thibault Saunier
718122a9bf encoding: Support more topologies in profile_from_discoverer()
Previous implementation was only working when the stream was inside a
container, this refactoring allows using virtually any stream as input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/766>
2020-07-31 00:15:58 +00:00
Thibault Saunier
1cead20777 encodebin: Fix and refactor smart encoding
It was not working properly and the implementation of the smartencoder
element was weird. This introduce a number of changes (which are all
in one single commit because they basically all work together and lead
to basically reimplementing the element):

* Make smartencoder a bin so that the reencoding chain of elements are
  inside of it instead of not having any parent. Those elements were not
  be visible when dumping the pipeline which was very confusing.
* Make encodebin create the right encoder with a capsfilter (and parser)
  to properly enforce the format specified by the user, and so that the
  encoder properties specified in the encoding profile are respected.
* Use `decodebin` to do the decoding instead of selecting a decoder
  ourself and not plug any parser etc...
* Ensure that negotiated format in the sinkpad of smart encoder is fixed
  through time when the user requested a non dynamic output
* Add a parser at the beginning of the smart encoder
* Handle errors when reencoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
2020-07-22 16:01:25 +00:00
Thibault Saunier
9412e61150 pbutils: Do not restrict number of similar profiles in a container
We have the notion of presence, and when the user want to be in control
it is totally legitimate for him to have several occurrences of a
similar profile

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/746>
2020-07-09 21:59:54 +00:00
Ayush Mittal
8aa29ada7f Added the path property in encoding-target
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/714>
2020-06-26 19:57:06 +05:30
Sebastian Dröge
f2af205a78 Fix up and add various "Since" markers and other related docs fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/713>
2020-06-19 12:17:55 +03:00
Sebastian Dröge
47e2c4cc10 discoverer: Check sinkpad existence before retrieving caps
Otherwise we would error out without releasing the caps first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>
2020-05-06 11:52:20 +03:00
Sebastian Dröge
ceb705837d discoverer: Ensure that we have fixed, non-empty caps before passing passing to is_subtitle_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>
2020-05-06 11:51:00 +03:00
Sebastian Dröge
350a7197e7 discoverer: Try to get negotiated caps first on pad-added and only then fall back to a caps query
The negotiated caps will be more accurate and are fixed caps in any
case.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/498

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>
2020-05-06 11:46:25 +03:00
He Junyan
1781718a71 libs: pbutils: Add High throughput scc extensions profile idc(IDC 11)
It is compitable with scc and we can use scc's function to identify it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 21:26:29 +08:00
He Junyan
f43a3e1f7d libs: pbutils: select extension profile by profile idc.
the old manner does not consider the profile idc. The profile idc should
play an more important role in recognizing the profile than the other
information. And there is no need to mix profiles of different extensions
together to find the closest profile when the bits stream is not standard,
different extensions support different features and should not be mixed.

The correct way should be recognize the extension category by profile idc
firstly, and then find the closest profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 20:45:04 +08:00
He Junyan
5a1f526d22 libs: pbutils: rename the GstH265FormatRangeExtensionProfile.
GstH265FormatRangeExtensionProfile declares the common bits used
for not only format range extensions profiles, but also for several
different h265 extension profiles, such as high throughput, screen
content coding extensions, etc. And So the old name is not proper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 18:19:06 +08:00
Guillaume Desmottes
4610bb59ac opusdec: prevent 'channels=0' in caps
gst_opus_channel_positions() should fail if caps contains "channels=0".
Prevent index underflow when indexing gst_opus_channel_positions[] (CID 1462590).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/644>
2020-04-27 10:07:33 +02:00
Thibault Saunier
fef4717770 pbutils: Add EncodingProfile serialization support 2020-04-03 11:21:14 -03:00
Thibault Saunier
d794e5389e pbutils: Support for variable framerate in the encoding serialization 2020-04-03 11:21:14 -03:00
Niels De Graef
a6c4e92cb4 audiovisualizer: Add support for g_autoptr()
Ideally, we would use something like `G_DECLARE_DERIVABLE_TYPE`, but
that would break API.
2020-03-20 06:20:43 +00:00
Thibault Saunier
1e9da26b68 discoverer: Start discovering next URI from right thread
When using the cache, we were not using the right GMainContext to setup
next URI to discovery, fix that.
2020-02-10 17:16:42 -03:00
Thibault Saunier
ae2b4f8899 encodebin: Add missing 'Since' marker 2020-01-13 18:33:29 -03:00
Stéphane Cerveau
3b8769e673 codec-utils: add h264 constrained and progressive profiles
Those profiles have been added in the version 2012-01
and 2011-06 of the AVC spec.

Aligned code with https://bugzilla.gnome.org/show_bug.cgi?id=794127
2019-12-03 23:35:23 +00:00
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