The name `gst_element_get_request_pad()` is confusing to people
learning GStreamer. `gst_element_request_pad_simple()` aims at
providing the exact same functionality, while making it more
explicit it is a simplified `gst_element_request_pad()`.
`gst_element_request_pad_simple()` is consistent with other
functions such as `gst_element_seek_simple`.
This commit deprecates `gst_element_get_request_pad()` so that a
compilation warning is emitted when used and incite developers
to use the more explicit `gst_element_request_pad_simple()`.
See also https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/743#note_886586
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/802>
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>
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>
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>
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>
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>
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>
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>
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>
If a device provider fails to start (for instance the pulseaudio provider unable
to connect to the PulseAudio daemon) then the monitor should not keep track of
it in its `started` providers list. Otherwise a false positive critical warning
would be raised.
This patch also switches the started_count type from bool to int, for
consistency. This is a counter, after all.
API: gst_device_provider_is_started
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679>
Typing hints can only be passed to gst_value_deserialize()
through the type of the passed-in value. This means deserialization
can only target the desired type for the top-level elements,
making it for example impossible to deserialize an array of
flags to the expected type.
This commit exposes a new function, gst_value_deserialize_full(),
that takes an optional pspec as the extra parameter, and updates
the deserialization code to pass around that pspec, or the
element_spec when recursively parsing the elements of a list-type
value.
This allows for example passing arrays of flags through the
command line or gst_util_set_object_arg, eg:
foo="<bar,bar+baz>"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/629>
Custom meta is backed by a GstStructure, and does not require
that users of the API expose their GstMeta implementation as
public API for other components to make use of it.
In addition, it provides a simpler interface by ignoring the
impl vs. api distinction that the regular API exposes.
This new API is meant to be the meta counterpart to custom events
and messages, and to be more convenient than the lower-level API
when the absolute best performance isn't a requirement.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/609>
e.g. h264parse ! video/x-h264,stream-format=avc receives the following:
- caps: video/x-raw,stream-format=byte-stream
- gap event: baseparse tries to choose some default caps but would
override the downstream chosen caps field with upstreams value.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/581>
It's been around for more than 4 years and people have built
lots of stuff on top of it, doesn't really make sense to keep
it marked as unstable. We're unlikely to change it now, and
we can always deprecate it and make a new one if needed.
This stabilises the following API:
- gst_tracer_register()
- gst_tracing_get_active_tracers()
- gst_tracing_register_hook()
- gst_tracer_record_new()
- gst_tracer_record_log()
Might also help a bit with #424
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/576>
It was zero and in some condition it means that the control binding
values where ignored (as shown in the test). Setting it to MAXDOUBLE
so that the first time we sync the values from a a timestamp in the
right range the proper value is computed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/564>
For providers that don't support dynamic probing, just fall back to doing
a static one on start() to make the UI developers life easier.
This also means that the monitor doesn't need to call _can_monitor() before
calling start.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/353>
There is a race-condition that can trigger the assertion in
gst_bus_add_signal_watch_full():
If gst_bus_add_signal_watch_full() is called immediately after
gst_bus_remove_signal_watch() then bus->priv->signal_watch may still be set
because gst_bus_source_dispose() or gst_bus_source_finalize() was not yet
called.
This happens if the corresponding GMainContext has the source queued for
dispatch. In this case, the following dispatch will only unref and delete
the signal_watch because it was already destroyed. Any pending messages
will remain until a new watch is installed.
So bus->priv->signal_watch can be cleared immediately when the watch is
removed. This avoid the race condition.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/543>
These can be passed to gst_type_mark_as_plugin_api, to inform
plugin cache generation.
For now a single flag is specified, "IGNORE_ENUM_MEMBERS", it
can be used for dynamically generated enums to avoid documenting
environment-specific enumeration members. An example is
GstX265EncTune.
Since those are using the clock for sync, they need to also
provide a clock for good measure. The reason is that even if
downstream elements provide a clock, we don't want to have
that clock selected because it might not be running yet.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/509>
This test takes 39 seconds on my machine even though it just runs
a couple of fakesrc num-buffers=2 ! fakesink pipelines. Most of
the cpu seems to be spent in libz, related to stack trace management.
Use stack-traces-flags=none instead of stack-traces-flags=full
until a better solution can be found. Might warrant more
investigation in any case..
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/503>