Jose Quaresma [Sat, 10 Oct 2020 19:09:03 +0000 (19:09 +0000)]
gstpluginloader: when env var is set do not fall through to system plugin scanner
If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
Falling through to the one installed on the system is problamatic in cross-compilation
environemnts, regardless of whether one pointed to by the env var succeeded or failed.
taken from:
http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=
0db7ba34ca41b107042306d13a6f0162885c123b
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
Jan Alexander Steffens (heftig) [Fri, 19 Mar 2021 12:46:13 +0000 (13:46 +0100)]
gst-inspect: Allow overriding DEFAULT_LESS_OPTS with GST_LESS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/777>
Sebastian Dröge [Tue, 6 Apr 2021 17:56:55 +0000 (20:56 +0300)]
aggregator: Release pads' peeked buffer when removing the pad or finalizing it
The peeked buffer was always reset after calling ::aggregate() but under
no other circumstances. If a pad was removed after peeking and before
::aggregate() returned then the peeked buffer would be leaked.
This can easily happen if pads are removed from the aggregator from a
pad probe downstream of the source pad but still in the source pad's
streaming thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/784>
Chris White [Wed, 31 Mar 2021 00:24:07 +0000 (20:24 -0400)]
caps: Add gst_caps_features_new_single()
For use with a single feature now that gst_caps_features_new() is
G_GNUC_NULL_TERMINATED.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_855357
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Chris White [Sat, 27 Mar 2021 21:10:06 +0000 (17:10 -0400)]
typefind: add gst_type_find_suggest_empty_simple()
For cases where you only need a media type and no other fields.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_848664
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Chris White [Thu, 18 Mar 2021 23:06:20 +0000 (19:06 -0400)]
gst: Add missing G_GNUC_NULL_TERMINATED markers
Functions that require NULL as their last vararg are marked so the
compiler can warn on missing NULL.
Also, document the NULL terminator for gst_make_element_message_details()
and gst_tracer_record_new().
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/669
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Pieter Willem Jordaan [Wed, 31 Mar 2021 19:13:45 +0000 (21:13 +0200)]
systemclock: Fix deadlock on clock_nanosleep
Always use the monotonic clock's diff and end time for clock_nanosleep to have predictable behaviour even with other clock types.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/779>
Jason Carrete [Fri, 26 Mar 2021 21:00:54 +0000 (21:00 +0000)]
Update gst-launch-1.0.1
Fixed a small typo in the gst-launch-1.0 man page
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/780>
Sebastian Dröge [Fri, 19 Mar 2021 08:33:13 +0000 (10:33 +0200)]
bin: Don't special-case G_SIGNAL_RUN_CLEANUP stage in latency signal accumulator
This signal don't run the class handler in the CLEANUP stage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/776>
Aaron Boxer [Sun, 11 Aug 2019 23:13:57 +0000 (19:13 -0400)]
gst: enforce gst_deinit one call per process
unit tests do not need to call deinit as it is already called in exit handler
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/236>
Aaron Boxer [Sun, 11 Aug 2019 18:20:42 +0000 (14:20 -0400)]
gst: disable indent for parse_goption_arg
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/236>
Stéphane Cerveau [Wed, 17 Mar 2021 15:39:30 +0000 (16:39 +0100)]
device provider: add custom register macro
This macro allows to register a device provider with
a custom function which gives more flexibility when
registering it (see v4l2 register).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/773>
Matthew Waters [Thu, 18 Mar 2021 03:46:15 +0000 (14:46 +1100)]
gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/775>
Seungha Yang [Wed, 18 Nov 2020 13:32:30 +0000 (22:32 +0900)]
clocksync: Add a new property "sync-to-first" for automatic ts-offset setup
Add a new property so that clocksync can setup "ts-offset" value
based on the first buffer and pipeline's running time when the
first arrived. Newly update "ts-offset" in this case would be
a value that allows outputting the first buffer without clock waiting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/702>
Olivier Crête [Tue, 16 Mar 2021 23:02:06 +0000 (19:02 -0400)]
aggregator: Release the SRC lock while querying latency
This is required because the query could be intercepted and the
application could send any other requests to the element from this
thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/771>
Mathieu Duponchelle [Wed, 17 Mar 2021 13:06:51 +0000 (14:06 +0100)]
value: fix parsing of explicit value casts
Since
acdb4ce03d525a18f6c351a040b8446c7bbd98bd , parsing of the
value for a property can use the pspec to determine what type
a value should be casted to.
However, this broke the case where the value is explicitly casted
to a type (eg <(float) 0.0>). In that situation, we want to respect
the casting decision, and only use the pspec to perform "implicit"
casts.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/881
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/772>
Guillaume Desmottes [Thu, 11 Mar 2021 14:41:16 +0000 (15:41 +0100)]
clock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
GstClockID is secretly a gpointer so we can't use g_autoptr(),
instead user can do:
g_auto (GstClockID) clock_id = 0;
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/769>
Stéphane Cerveau [Mon, 8 Mar 2021 09:27:15 +0000 (10:27 +0100)]
element: remove useless ret test
The ret test is unrelevant and confusing.
We dont want the code to fail and the register
to succeed by example.
In the case of a conditional element_init,
the element should be defined with
GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/768>
Stéphane Cerveau [Fri, 26 Feb 2021 09:47:38 +0000 (10:47 +0100)]
bash-completion: various bash fixes
-d tests the folder which is existing but with .in file, so I prefered
the -f to test if the gst file was available which is not the case, so
it fallbacks on the pkg-config
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>
Stéphane Cerveau [Fri, 26 Feb 2021 09:01:56 +0000 (10:01 +0100)]
meson: add uninstalled var for bash-completion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>
Guillaume Desmottes [Wed, 24 Feb 2021 12:03:47 +0000 (13:03 +0100)]
miniobject: add GST_TYPE_MINI_OBJECT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/764>
Mathieu Duponchelle [Wed, 17 Feb 2021 17:35:33 +0000 (18:35 +0100)]
docs: standardize debugutils documentation
* add a SECTION comment
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/760>
Mathieu Duponchelle [Tue, 16 Feb 2021 15:18:08 +0000 (16:18 +0100)]
docs: standardize GstControlSource, GstDateTime documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/759>
Mathieu Duponchelle [Thu, 21 Jan 2021 01:04:25 +0000 (02:04 +0100)]
Revert "baseparse: always use incoming DTS"
This reverts commit
fc5cd9591a3fe09458342cfedfff88d57bc330c7.
Mathieu Duponchelle [Mon, 15 Feb 2021 14:06:46 +0000 (15:06 +0100)]
docs: standardize GstContext, GstControlBinding documentation
* Document virtual methods in standalone comments, in order to properly
annotate them
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Mark GstControlBinding ABI field as private
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/758>
Mathieu Duponchelle [Fri, 12 Feb 2021 16:50:21 +0000 (17:50 +0100)]
docs: standardize GstClock documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is not critical here, as parameters do not
need annotations / specific documentation, but serves as an up to
date example
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/756>
Stéphane Cerveau [Mon, 15 Feb 2021 08:54:51 +0000 (09:54 +0100)]
features: remove extra G_BEGIN_DECLS/G_END_DECLS
_GST_ELEMENT_REGISTER_DEFINE_BEGIN
_GST_ELEMENT_REGISTER_DEFINE_END was introducing
an extra extern "C" in case of c++ build.
Add missing ";" in GST_ELEMENT_REGISTER_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/757>
Mathieu Duponchelle [Thu, 11 Feb 2021 15:04:01 +0000 (16:04 +0100)]
docs: standardize GstCapsFeatures, GstChildProxy documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Document virtual methods in standalone comments, in order to properly
annotate them
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/755>
Mathieu Duponchelle [Wed, 10 Feb 2021 13:19:18 +0000 (14:19 +0100)]
docs: standardize GstCaps documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Reword the warnings for caps nestability in light of the 1.20
improvements
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/754>
Jan Schmidt [Tue, 9 Feb 2021 17:14:48 +0000 (04:14 +1100)]
tests: Add disjoint pad probe removal test.
Add a test that removing a blocking probe on events when there
is a different blocking probe on buffers releases the data flow.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Jan Schmidt [Fri, 5 Feb 2021 16:58:54 +0000 (03:58 +1100)]
pad: Improve the documentation for GstPadProbeReturn.
Explain that GST_PAD_PROBE_PASS will pass data even if there is
another pad probe that says to block, and that GST_PAD_PROBE_REMOVE
passes data and potentially unblocks the pad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Jan Schmidt [Fri, 5 Feb 2021 16:41:23 +0000 (03:41 +1100)]
pad: Fix for multiple blocking probes interaction.
Change the way the marshalled flag in the internal ProbeMarshall state
is handled when iterating over pad probes so that it only counts
probes that still exist and would be called when retrying.
This improves the way that removing a blocking probe works when
there are multiple blocking probes for different conditions (data vs
events for example).
As a side-effect, probes aren't put into the the called_probes array
unless they actually match the current probe type and would be called,
potentially reducing the number of hooks that get stored in the
called_probes array, and the cost of the looping check on retries.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/658
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Mathieu Duponchelle [Tue, 9 Feb 2021 14:30:50 +0000 (15:30 +0100)]
docs: standardize GstBus documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods and the class structure
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/753>
Mathieu Duponchelle [Mon, 8 Feb 2021 14:17:05 +0000 (15:17 +0100)]
docs: standardize GstBufferPool documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is functionally useful here, as parameters
require annotations, and should make the class more usable by
bindings.
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Mon, 8 Feb 2021 13:31:09 +0000 (14:31 +0100)]
docs: standardize GstBufferList documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Mon, 8 Feb 2021 12:53:51 +0000 (13:53 +0100)]
docs: fix GST_BUFFER_COPY_DEEP comment title
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Fri, 5 Feb 2021 13:55:37 +0000 (14:55 +0100)]
docs: standardize GstBuffer documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/748>
Mathieu Duponchelle [Thu, 4 Feb 2021 15:15:39 +0000 (16:15 +0100)]
docs: standardize GstBin documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is not critical here, as parameters do not
need annotations / specific documentation, but serves as an up to
date example
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/747>
Mathieu Duponchelle [Thu, 4 Feb 2021 14:18:04 +0000 (15:18 +0100)]
docs: reformat and cleanup GstBin SECTION comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/747>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:41:28 +0000 (16:41 +0100)]
docs: clean up GstAllocator documentation
In particular, there is no need to explicitly mention free
functions / ownership transfers, this should be obvious from
the annotations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:34:03 +0000 (16:34 +0100)]
docs: sort GstAllocator doc so that GstAllocator appears first
The default ordering is alphabetical, causing GstAllocationParams
to appear first in the page if left auto-sorted
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:19:46 +0000 (16:19 +0100)]
docs: cleanup gst.c documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Seungha Yang [Fri, 29 Jan 2021 14:07:34 +0000 (23:07 +0900)]
filesrc/filesink: Use g_open/g_fopen and g_close instead of ours
There should be no more cross-CRT issue on Windows since we bumped
MinGW toolchain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/744>
Sebastian Dröge [Sun, 31 Jan 2021 10:12:09 +0000 (12:12 +0200)]
info: Don't leak log function user_data if the debug system is compiled out
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/742>
Aleksandr Slobodeniuk [Mon, 25 Jan 2021 21:51:33 +0000 (22:51 +0100)]
gstvalue: fix compilation warning in "holds" macros
GST_VALUE_HOLDS_... macros may cause -Waddress warning
on gcc if GValue is allocated on stack:
gstvalue.h:145:46: warning: the comparison will always
evaluate as ‘true’ for the address of ‘v’ will never
be NULL [-Waddress]
#define GST_VALUE_HOLDS_CAPS(x) ((x) != NULL &&
G_VALUE_TYPE(x) == _gst_caps_type)
Fixes #653
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/738>
Chris White [Thu, 24 Dec 2020 19:06:29 +0000 (14:06 -0500)]
structure: add tests of deserializing strings with escapes
Shows the issue described in
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303#note_272629>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Mon, 28 Oct 2019 18:06:14 +0000 (18:06 +0000)]
gstvalue: preserve parse behaviour with warning
Preserve the previous behaviour where:
name, val="5";
passed to gst_structure_from_string would have resulted in an int value,
rather than a string, despite the quote marks.
This will be changed to being interpreted as a string in the future, but
for the time being we will issue a warning about this to give users time
to fix their code to no longer rely on this bug.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Wed, 23 Oct 2019 11:48:32 +0000 (12:48 +0100)]
gstvalue: make gst_string_unwrap less strict
Allow a string in gst_string_unwrap to include unescaped characters that
are not in GST_STRING_IS_ASCII. This extra leniency allows
gst_structure_from_string to, e.g., receive
name, val=(string)"string with space";
Note that many gst tests, and potentially users, exploited this behaviour
by giving
name, val="string with space";
i.e. without the (string) type specifier. This was allowed before
because, without a type specifier, the string was passed to
_priv_gst_value_parse_string with unescape set to TRUE, *rather* than
being sent to gst_string_unwrap. This caused a difference in behaviour
between strings that are or are not preceded by (string). E.g.
name, val=(string)"string with space";
would fail, whilst
name, val="string with space";
would not. And
name, val=(string)"\316\261";
would produce a val="α", whereas
name, val=(string)"\316\261";
would produce a val="316261" (a bug).
The current behaviour is to treat both of these cases the same, which is
desirable. But in order to not break potentially common usage of this
discrepancy (it was in our own tests), the best option is to make string
parsing less strict in general.
New behaviour would be for
name, val=(string)"string with space";
to pass and give val="string with space", and
name, val="\316\261";
would produce a val="α".
Also changed deserializing string test to expect successes where
previously a failure was expected.
In a similar way, this also effected the deserializing of GstStructure,
GstCaps, GstTagList and GstCapsFeatures. So, now
name, val=(structure)"sub-name, sub-val=(string)\"a: \\316\\261\";";
will also pass and give sub-val="a: α". Note that the quote marks
and backslash still need to be escaped for the sub-structure, but other
characters need not be.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Fri, 18 Oct 2019 22:11:44 +0000 (23:11 +0100)]
value: add serialize-deserialize tests
Added tests to ensure that the gst_value_deserialize reverses
gst_value_serialize.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Fri, 18 Oct 2019 12:00:33 +0000 (13:00 +0100)]
structure: don't unescape values before deserializing
No longer call _priv_gst_value_parse_string with unescape set to TRUE
before passing a value to gst_value_deserialize in
_priv_gst_value_parse_value. This latter function is called by
gst_structure_from_string and gst_caps_from_string.
When gst_structure_to_string and gst_caps_to_string are called, no
escaping is performed after calling gst_value_serialize. Therefore, by
unescaping the value string, we were introducing an additional operation
that was not performed by the original *_to_string functions. In
particular, this has meant that the derialization functions for many
non-basic types are incomplete reverses of the corresponding
serialization function (i.e., if you pipe the output of the
serialization function into the deserialization function it could fail)
because they have to compensate for this additional escaping operation,
when really this should be the domain of the deserialization functions
instead.
Correspondingly changed a few deserialization functions.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/452
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Seungha Yang [Thu, 14 Jan 2021 16:16:34 +0000 (01:16 +0900)]
task: Use SetThreadDescription Win32 API for setting thread name
Since Windows 10 1607, we can make use of SetThreadDescription() API
for setting thread name. Unlike previously used exception based
method, this API will preserve configured thread name on dump file.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/735>
Jan Alexander Steffens (heftig) [Thu, 14 Jan 2021 14:50:05 +0000 (15:50 +0100)]
tests: systemclock: Stop all stress threads before joining them
This reduces the chance of the main thread getting starved while trying
to shut down the test, potentially causing a timeout.
Even on an idle 96-processor system this reduces the duration of the
systemclock tests from ~8s to ~3s.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/734>
Marijn Suijten [Thu, 14 Jan 2021 09:18:51 +0000 (10:18 +0100)]
gstmemory: Mark memory_map @info as `caller-allocates`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Marijn Suijten [Thu, 14 Jan 2021 09:20:41 +0000 (10:20 +0100)]
gstbuffer: Mark buffer_map* @info as `caller-allocates`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Marijn Suijten [Thu, 7 Jan 2021 08:53:41 +0000 (09:53 +0100)]
gst,base: Take GstAllocationParams parameter by const ptr
This parameter is only informational and should not be modified. Enforce
this at compile-time and to get the right signature in G-IR.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Seungha Yang [Tue, 12 Jan 2021 18:01:57 +0000 (03:01 +0900)]
uri: Remove leftover documentation
Follow-up from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/732>
Seungha Yang [Fri, 8 Jan 2021 11:23:23 +0000 (20:23 +0900)]
gst: Add non-inline methods for bindings to able to use core APIs
Provide non-inline version of refcounting APIs so that it can be
consumed by bindings
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/46
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728>
Philippe Normand [Thu, 7 Jan 2021 11:04:48 +0000 (11:04 +0000)]
concat: Fix active-pad property doc typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/727>
Dmitry Samoylov [Wed, 23 Dec 2020 17:40:33 +0000 (00:40 +0700)]
gst: Fix doc comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/725>
Michael Tretter [Fri, 23 Oct 2020 15:44:10 +0000 (17:44 +0200)]
pipeline: clarify that applications should handle bus messages
The pipeline posts messages on the bus even if an application does not
handle the messages. This is expected behavior but may leak messages if
the messages are not handled.
Clarify the documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/680>
Fredrik Pålsson [Sat, 12 Dec 2020 22:28:46 +0000 (22:28 +0000)]
gstbus: change log level of repeated messages from INFO to DEBUG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/722>
Jakub Adam [Fri, 11 Dec 2020 15:01:27 +0000 (16:01 +0100)]
harness: don't use GST_DEBUG_OBJECT with GstHarness
GstHarness is not a GObject. Fixes assert on recently added check in
gst_debug_log_valist() if GST_ENABLE_EXTRA_CHECKS is enabled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/720>
Thibault Saunier [Thu, 10 Dec 2020 18:48:32 +0000 (15:48 -0300)]
bus: Ensure that only one GSource can be attached to the bus
Until now we were enforcing that only 1 signal GSource was attached
the bus but we could attach as many GSource with `gst_bus_create_watch`
as we wanted... but in the end only 1 GSource will ever be dispatched for
a given `GstMessage` leading to totally broken behavior.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
Thibault Saunier [Thu, 10 Dec 2020 18:05:31 +0000 (15:05 -0300)]
bus: Do not override source->prepare
Since GLib 2.36 we do not need it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
Nicolas Dufresne [Thu, 10 Dec 2020 19:08:53 +0000 (14:08 -0500)]
gir: Fix parser warning due to empty line
The GIR parser does not want any empty line after the function or macro
name line.
Fixes the following warning:
[309/4246] Generating Gst-1.0.gir with a custom command
../subprojects/gstreamer/gst/gstelement.h:57: Warning: Gst: "@element" parameter unexpected at this location:
* @element: The element name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gstelement.h:84: Warning: Gst: "@e" parameter unexpected at this location:
* @e: The element name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gstelement.h:106: Warning: Gst: "@e" parameter unexpected at this location:
* @e: The element name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gstdeviceprovider.h:32: Warning: Gst: "@d_p" parameter unexpected at this location:
* @d_p: The device provider name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gstdynamictypefactory.h:28: Warning: Gst: "@t_n" parameter unexpected at this location:
* @t_n: The dynamic type name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gsttypefind.h:34: Warning: Gst: "@type_find" parameter unexpected at this location:
* @type_find: The type find name in lower case, with words separated by '_'.
^
../subprojects/gstreamer/gst/gsttypefind.h:61: Warning: Gst: "@t_f" parameter unexpected at this location:
* @t_f: The type find name in lower case, with words separated by '_'.
^
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/719>
Thibault Saunier [Thu, 10 Dec 2020 12:57:37 +0000 (09:57 -0300)]
structure: Handle trailing comas in serialized structs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/717>
Stéphane Cerveau [Tue, 6 Oct 2020 12:26:30 +0000 (14:26 +0200)]
coreelements: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
Stéphane Cerveau [Tue, 1 Dec 2020 11:46:19 +0000 (12:46 +0100)]
dynamic type: add convenience macros to register
This macros will help to register a dynamic type
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
Stéphane Cerveau [Mon, 30 Nov 2020 10:51:59 +0000 (11:51 +0100)]
type find: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
Stéphane Cerveau [Fri, 27 Nov 2020 16:33:33 +0000 (17:33 +0100)]
device provider: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
Julian Bouzas [Mon, 31 Aug 2020 18:05:49 +0000 (14:05 -0400)]
element: add convenience macros to register
Define separate macros to define an element
apart from the plugin itself.
These macros will help to register
elements a part from a plugin.
By example in the case of a gstreamer static build
producing the libgstreamer-full library.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
Stéphane Cerveau [Tue, 1 Dec 2020 16:17:30 +0000 (17:17 +0100)]
gst-inspect: add an option to sort plugins
with the option --sort, the output is sort by default
with alphabetical order with plugins and features.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/709>
Sebastian Dröge [Mon, 7 Dec 2020 10:23:15 +0000 (12:23 +0200)]
datetime: Update tests for returning NULL instead of g_return_val_if_fail() in error cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
Sebastian Dröge [Wed, 25 Nov 2020 12:02:23 +0000 (14:02 +0200)]
datetime: Make use of new g_time_zone_new_identifier() that properly handles errors
g_time_zone_new() returns UTC if it fails to parse the timezone
identifier, which is rather suboptimal and causes wrong datetimes to be
created silently.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
Sebastian Dröge [Wed, 25 Nov 2020 12:00:45 +0000 (14:00 +0200)]
datetime: Clean up all constructors to fail gracefully if invalid dates/times are provided
And also don't crash dereferencing a NULL pointer if the GDateTime
functions return NULL.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/632
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
Sebastian Dröge [Wed, 25 Nov 2020 11:36:19 +0000 (13:36 +0200)]
datetime: Change getters to return specific invalid values if the value is not set
This is more bindings friendly than requiring a special function to be
called beforehand or getting an assertion instead, and should also
simplify some usage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
Sebastian Dröge [Wed, 25 Nov 2020 11:35:57 +0000 (13:35 +0200)]
datetime: Improve documentation a bit to explain when NULL is returned
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
Thibault Saunier [Wed, 15 Jul 2020 02:36:36 +0000 (22:36 -0400)]
gst: Add new structure/caps/_to_string using the brackets for nesting
This adds `gst_structure_serialize` and `gst_caps_serialize` which use
the newly introduced bracket delimiters for nested structures.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
Thibault Saunier [Wed, 17 Jun 2020 13:31:18 +0000 (09:31 -0400)]
value: Cleanup on range parsing failures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
Thibault Saunier [Tue, 16 Jun 2020 04:07:51 +0000 (00:07 -0400)]
structure: Add support for brackets as nested structures/caps specifiers
This introduces a more human friendly syntax to specify nested
structures It does so by using 2 different markers for opening and
closing them instead of abusing quotes which lead to requiring an insane
amount of escaping to match nesting levels.
The brackets (`[` and `]`) have been chosen as they avoid complex
constructions with curly brackets (or lower/higher than signs) where you
could have structures embedded inside arrays (which also use curly
brackets), ie. `s, array=(structure){{struct}}` should be parsed as an
array of structures, but the cast seems to imply something different. We
do not have this issue with brackets as they are currently used for
ranges, which can only be casted to numeric types.
This commit does not make use of that new syntax for serialization as
that would break backward compatibility, so it is basically a 'sugar'
syntax for humans. A notice has been explicitly made in the
documentation to let the user know about it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
Marijn Suijten [Thu, 3 Dec 2020 18:22:43 +0000 (19:22 +0100)]
check: gst_test_clock_process_next_clock_id returns nullable
It is possible there are no more pending clocks in the chain, in which
case this function returns null.
See also tests like test_single_shot_async_future that validate NULL
returns.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/714>
Jose Quaresma [Tue, 1 Dec 2020 19:17:05 +0000 (19:17 +0000)]
meson: gtk_doc is not supported anymore
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/710>
Sebastian Dröge [Wed, 2 Dec 2020 07:22:35 +0000 (09:22 +0200)]
streams: gst_stream_type_get_name() is not nullable
It takes an enum and only the defined values are valid to pass in here
as it's not extensible from the outside.
Add a g_return_val_if_reached() for the unreachable case and return
"invalid".
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/711>
Sebastian Dröge [Wed, 2 Dec 2020 07:35:26 +0000 (09:35 +0200)]
info: Warn if logging with a non-GObject object if GST_ENABLE_EXTRA_CHECKS is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/712>
Tim-Philipp Müller [Fri, 20 Nov 2020 14:55:17 +0000 (14:55 +0000)]
taskpool: fix docs warnings
gsttaskpool.c:507: Warning: Gst: gst_shared_task_pool_get_max_threads: unknown parameter 'max_threads' in documentation comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/703>
Jonathan Matthew [Tue, 10 Nov 2020 11:39:13 +0000 (21:39 +1000)]
typefind: copy seqnum to new segment event
Fixes: #635
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/700>
Edward Hervey [Fri, 30 Oct 2020 15:58:52 +0000 (16:58 +0100)]
systemclock: Use clock_nanosleep for higher accuracy
The various wait implementation have a latency ranging from 50 to 500+
microseconds. While this is not a major issue when dealing with a low number of
waits per second (for ex: video), it does introduce a non-negligeable jitter for
synchronization of higher packet rate systems.
The `clock_nanosleep` syscall does offer a lower-latency waiting system but is
unfortunately blocking, so we don't want to use it in all scenarios nor for too
long.
This patch makes GstSystemClock use clock_nanosleep (if available) as such:
* Any wait below 500us uses it
* Any wait below 2ms will first use the regular waiting system and then
clock_nanosleep
# modified: gst/gstsystemclock.c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/688>
Mathieu Duponchelle [Tue, 3 Nov 2020 01:43:26 +0000 (02:43 +0100)]
taskpool: expose new "shared" task pool implementation
While the default implementation will spawn a thread per new
pushed task, this new implementation instead spawns a maximum
number of threads, then queues new tasks on existing threads.
The thread that the new task will be queued on is picked in
a pretty naive fashion, by simply popping the first thread
from a queue and pushing it back to the tail, but this is
an implementation detail and can always be sophisticated
in the future if the need arises.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
Mathieu Duponchelle [Tue, 3 Nov 2020 01:41:31 +0000 (02:41 +0100)]
taskpool: expose dispose_handle() API
This is useful when the subclass does return a non-NULL pointer
in push(), and the user doesn't want to call join()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
Mathieu Duponchelle [Tue, 3 Nov 2020 01:39:37 +0000 (02:39 +0100)]
taskpool: improve join() documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
Mathieu Duponchelle [Tue, 3 Nov 2020 01:33:32 +0000 (02:33 +0100)]
taskpool: modify transfer annotations for push() and join()
While the default implementation passes NULL around as the
task handle, other implementations can only provide a safe
API by having that handle map to a refcounted opaque type.
While what's passed around is a gpointer, a valid transfer
type annotation has informative value.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
Sebastian Dröge [Sat, 17 Oct 2020 09:34:20 +0000 (12:34 +0300)]
Add some missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/678>
Nirbheek Chauhan [Wed, 4 Nov 2020 13:07:32 +0000 (18:37 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang
This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.
Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/698>
Bing Song [Mon, 2 Nov 2020 09:43:42 +0000 (17:43 +0800)]
identity/clocksync: Also provide system clock if sync=false
identity should provide when sync=true. Don't provide when sync=false.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/630
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/690>
Jonathan Matthew [Tue, 3 Nov 2020 12:39:54 +0000 (22:39 +1000)]
queue2: Fix modes in scheduling query handling
Create a new query to send upstream and copy the flags across from it,
rather than reusing the same query, as this allows us to prevent use
of pull mode when we don't have a download file.
Fixes: #629
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/693>
Khem Raj [Wed, 4 Nov 2020 06:58:26 +0000 (22:58 -0800)]
gst_private.h: increse padding in struct _GstClockEntryImpl
When compiling for 32bit architectures with 64bit time_t e.g. riscv32,
the static assert that the GstClockEntryImpl smaller or
equal to the struct _GstClockEntryImpl triggered.
(they were 12bytes off).
To fix this, the padding is increased by 8 bytes (on 32bit).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/694>
Chris White [Sat, 31 Oct 2020 19:10:23 +0000 (15:10 -0400)]
gstinfo: colorize PIDs in log messages
The PIDs on log lines were supposed to be colorized before, but the
escape sequence was incorrect. With this change, the code uses the
correct sequence to colorize those PIDs. E.g., instead of `\033[334m`
(incorrect), use `\033[34m` (correct).
This makes the log messages easier to read. It also reduces the chance
that a buggy terminal will choke on the invalid escape sequence.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/624
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/689>
Jan Schmidt [Fri, 30 Oct 2020 12:46:07 +0000 (23:46 +1100)]
harness: Handle element not being set cleanly.
If a harness is created with gst_harness_new_empty(), there
might not be an internal element to unref on cleanup.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/686>
Jan Schmidt [Thu, 29 Oct 2020 13:45:42 +0000 (00:45 +1100)]
bin: When removing a sink, check if the EOS status changed.
Removing a sink that hasn't posted EOS might change the bin itself
to EOS if it's the last remaining non-EOSed sink.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/683>
Mathieu Duponchelle [Mon, 26 Oct 2020 22:17:59 +0000 (23:17 +0100)]
baseparse: always use incoming DTS
When parsing interlaced video streams, ignoring incoming DTS could
cause the parser to end up with PTS < DTS output buffers, for example
when increasing next_dts using the duration of the last pushed
buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/681>