Commit graph

26 commits

Author SHA1 Message Date
Thibault Saunier 2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
Thibault Saunier a8fca8d040 encodebin: Add APIs to set element properties on encoding profiles
User often want to set encoder properties on encoding profiles,
this introduces a way to easily 'preset' properties when defining the
profile. This uses GstStructure to define those properties the same
way it is done in `splitmux` for example as it makes simple to handle.

This also defines a more complex structure type where we can map a set
of properties to set depending on the muxer/encoder factory that has
been picked by EncodeBin so it is quite flexible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>
2021-02-10 15:56:26 +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
Thibault Saunier 909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +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
Tim-Philipp Müller cad9759e7b pbutils: GST_EXPORT -> GST_PBUTILS_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:16:42 +00:00
Tim-Philipp Müller 1b6494a644 pbutils: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:38 +01:00
Thibault Saunier 46b424a38b encoding-profile: Add a way to copy an encoding profile
It is often usefull to make sure that you get a full copy of a profile.
For example you want to let the user modify it in the user interface
but still keep an unchanged version for later use.

API:
  gst_encoding_profile_copy
2017-01-06 11:40:20 -03:00
Sebastian Dröge fd32d5812a encoding-profile: Don't put G_BEGIN_DECLS around #include statements
It should only be around our own declarations.
2016-04-25 15:06:23 +03:00
Xavier Claessens 429860e51f base: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:39:43 -05:00
Thibault Saunier dcfb8a83a5 encodebin: Add a way to enable/disabled a GstEncodingProfile
Summary:
So that the user can easily use the same encoding profile to render
with/without audio/video stream.

API:
  gst_encoding_profile_is_disabled
  gst_encoding_pofile_set_enabled

https://bugzilla.gnome.org/show_bug.cgi?id=749056
2015-06-01 10:22:31 +02:00
Thibault Saunier 72c05d1cbb encodebin: Add a way to disable caps renegotiation for output stream format
In some cases, the user might want the stream outputted by encodebin to
be in the exact same format during all the stream. We should let the
user specify when this is the case. This commit add some API in the
GstEncodingProfile to determine whether the format can be renegotiated
after the encoding started or not.

API:
    gst_encoding_profile_set_allow_dynamic_output
    gst_encoding_profile_get_allow_dynamic_output

https://bugzilla.gnome.org/show_bug.cgi?id=740214
2014-11-28 16:56:32 +01:00
Tim-Philipp Müller 42f971c5eb encoding-profile: add gst_encoding_profile_get_file_extension()
API: gst_encoding_profile_get_file_extension()

https://bugzilla.gnome.org/show_bug.cgi?id=636753
2012-12-23 15:26:59 +00:00
Thibault Saunier 6a7f688939 encoding-profile: Let the user decide what preset name to use
It was possible to decide only what #GstElement implementing #GstPreset
to use during the encoding, we can now let the user select a specific preset previously
saved using #gst_preset_save_preset specifying the name chosen when it was saved
in the gst_encoding_profile_set_preset_name.

Actually loading a preset with %NULL as a name would have always failed, so
in the current state of the API that feature is unusable

API:
  gst_encoding_profile_set_preset_name
  gst_encoding_profile_get_preset_name
2012-12-05 17:36:21 -03:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Edward Hervey 2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Tim-Philipp Müller dfb244fb50 pbutils: make encoding profile classes opaque
Don't typedef them to GObjectClass directly, but hide behind
private structs. Fixes issues with gobject-introspection
and GstEncodingProfileClass.

https://bugzilla.gnome.org/show_bug.cgi?id=668542
2012-03-20 10:51:53 +00:00
Wim Taymans bfd417644d pbutils: clean up headers
Add padding
indent
2011-11-11 19:01:56 +01:00
Wim Taymans a00927ad03 Merge branch 'master' into 0.11 2011-10-04 17:58:49 +02:00
Vincent Penquerc'h 93900d47ed encoding-profile: add a function to create a profile from a discoverer info
Only A/V streams are added at the moment, there does not seem to be
a similar way to add other streams (eg, subtitles).

https://bugzilla.gnome.org/show_bug.cgi?id=642878
2011-10-03 11:51:23 +02:00
Sebastian Dröge 0e85826a05 encoding-profile: Returns a new reference of caps everywhere instead of const caps 2011-05-17 13:05:56 +02:00
Wim Taymans b967bf531b pbutils: use GObject as the base class
We can't subclass miniobject so use GObject as the base class,
2011-02-28 11:50:03 +01:00
Edward Hervey 19201c1ab0 encoding: encoding_profile_get_output_caps => _get_input_caps
Makes more sense name-wise
2011-01-05 22:02:35 +01:00
Edward Hervey deea1eb83f encoding-profile: Add convenience method to find a profile
API: gst_encoding_profile_find
2011-01-05 20:54:21 +01:00
Rob Clark aa07af41f3 fix compile errors on macosx
with i686-apple-darwin10-gcc-4.2.1:

encoding-profile.h:134: warning: type qualifiers ignored on function return type
encoding-profile.c:240: warning: type qualifiers ignored on function return type
gstencodebin.c: In function 'next_unused_stream_profile':
gstencodebin.c:454: warning: format '%d' expects type 'int', but argument 8 has type 'GType'
gstencodebin.c:464: warning: format '%d' expects type 'int', but argument 8 has type 'GType'
2010-12-17 19:06:27 -06:00
Edward Hervey 82b4f9bfef pbutils: New Profile library
https://bugzilla.gnome.org/show_bug.cgi?id=627476
2010-12-15 11:54:32 +01:00