Commit graph

257 commits

Author SHA1 Message Date
Vivia Nikolaidou c6af0a39e7 inputselector: Add drop-backwards property
When sync-streams=true, drop backwards buffers on pad switch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3256>
2022-11-22 21:21:40 +02:00
Vivia Nikolaidou 5fb71dd55b inputselector: Fix waiting on sync-mode=clock
Basically copy over what clocksync does, but taking into account that we
have multiple upstream latencies.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3256>
2022-11-22 21:21:40 +02:00
Jan Schmidt 2a32861ab3 event: Add transfer none annotation to gst_event_new_stream_collection()
Update the documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3387>
2022-11-21 10:32:02 +00:00
Jan Schmidt bdaa8f83aa pad: Fix sticky event ordering for instant-rate-change
The event type for instant-rate-change events was poorly chosen,
leading to them being re-sent too late and even after EOS.

Add a mechanism in GstPad for the sticky event order to be
different to the value of the event type to fix that up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3387>
2022-11-21 10:32:02 +00:00
Célestin Marot 9d829b85e4 fakesrc: avoid time overflow with datarate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3433>
2022-11-19 11:13:33 +00:00
Colin Kinloch 7840db5384 gst: serialization of GLibDateTime
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2980>
2022-11-18 21:11:07 +00:00
Mathieu Duponchelle b5cd758230 aggregator: Implement force_live API
Setting force_live lets aggregator behave as if it had at least one of
its sinks connected to a live source, which should let us get rid of the
fake live test source hack that is probably present in dozens of
applications by now.

+ Expose API for subclasses to set and get force_live
+ Expose force-live properties in GstVideoAggregator and GstAudioAggregator
+ Adds a simple test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3008>
2022-11-18 18:14:26 +00:00
Jan Schmidt d3a66f9851 multiqueue: Protect reconfiguration with a lock
Add a lock to prevent overlapping of request and release
pads, to close a race where multiqueue might try and
add a slot with an id that hasn't quite finished being
removed yet by another thread.

Fix for https://gitlab.freedesktop.org/bilboed/gstreamer/-/issues/5
and https://gitlab.freedesktop.org/bilboed/gstreamer/-/issues/11

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
2022-11-16 14:01:46 +00:00
Edward Hervey 4b8f411c5d multiqueue: Handle gapless input
When dealing with gapless input (i.e. streams with changing group-id in
GST_EVENT_STREAM_START), we need to take into account the elapsed
running-time (if applicable) in order to properly calculate levels and output
time. Without doing this all incoming data from future groups would be
considered as being "late" and would be consumed immediately.

This does **NOT** modify the actual segment and buffer times, and is only used
internally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
2022-11-16 14:01:46 +00:00
Edward Hervey 64c81b6972 urisourcebin: Remove pending pad handling
This was needed to support the legacy handling of changing streams (add new
pads, send EOS and remove old pads).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
2022-11-16 14:01:46 +00:00
Sebastian Dröge 72c5105312 typefindhelper: Fix docs/annotations for the new functions
Follow-up for https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3418>
2022-11-16 04:07:09 +00:00
Thibault Saunier 9dc787755d inspect: Print default value of ValueArray properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3377>
2022-11-15 17:20:56 +00:00
Sanchayan Maity 30841dae99 typefindhelper: Use the new GstTypeFind * API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity 89da632219 typefindhelper: Introduce a new API for working with a GstTypeFind *
Introduce a new API that can return a GstTypeFind * with helper functions
and data set around buffer data.

While at it, drop factory field from GstTypeFindBufHelper. While it was
useful for logging, it was not passed through function arguments and keeping
it for logging would require an additional API increasing the API surface
and making it harder to use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity 036b77b519 typefindhelper: Add helpers to improve type finding given the caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity 58f7d88585 typefindhelper: Update annotation for function parameters
Fix the nullable/optional situation. allow-none is deprecated and
replaced by either or both of the others.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Edward Hervey ba0c95312e streams: Reset stream id field on finalize
If debugging is activated, the parent class finalize might attempt to read it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>
2022-11-12 10:33:50 +01:00
Edward Hervey e3637e3207 childproxy: Fix documentation
Warning: Gst: gst_child_proxy_get_child_by_name_recurse: unknown parameter
'parent' in documentation comment, should be 'child_proxy'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3370>
2022-11-09 16:03:58 +00:00
Sebastian Dröge 82f09d64d7 allocator: Switch allow-none annotations to nullable / optional
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3364>
2022-11-08 17:45:37 +02:00
Sebastian Dröge aadebd6921 allocator: Copy allocator name in gst_allocator_register()
The parameter is not marked as `transfer full` and stays around in the
hash table, so we will have to copy it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3364>
2022-11-08 17:44:54 +02:00
Guillaume Desmottes c624900a44 tracers: latency: document the 'reported' flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3359>
2022-11-08 10:10:09 +00:00
Tim-Philipp Müller db450689db Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3358>
2022-11-08 02:08:08 +00:00
Tim-Philipp Müller 3e29ac35c4 Release 1.21.2 2022-11-07 23:54:03 +00:00
Tim-Philipp Müller 98d2f958a9 Update ChangeLogs for 1.21.2 2022-11-07 23:53:57 +00:00
Xavier Claessens e8eddf46ea hotdoc: gst-hotdoc-plugins-scanner is not needed for libraries
Meson >= 0.64.0 does not allow any more to add executables into
hotdoc.generate_doc(..., dependencies: ...) and it should not be needed
any way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3352>
2022-11-07 23:06:32 +00:00
Jan Alexander Steffens (heftig) a51d492445 tests: gstinfo: Test set_threshold_from_string's new reset behavior
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>
2022-11-07 14:49:45 +00:00
Jan Alexander Steffens (heftig) 38a2453f23 tests: gstinfo: Make logging tests pass when GST_DEBUG is set
Use gst_debug_set_threshold_from_string's new reset behavior to undo
GST_DEBUG and ensure the logging tests have a known configuration.

`gst_debug_set_threshold_from_string ("LOG", TRUE)` has the same effect
as `gst_debug_set_threshold_from_string ("", TRUE)` followed by
`gst_debug_set_default_threshold (GST_LEVEL_LOG)`.

Don't bother remembering the default log level set when the test
started. It will get reset by the next test, anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>
2022-11-07 14:49:44 +00:00
Jan Alexander Steffens (heftig) 58013b4b21 info: Reset patterns with set_threshold_from_string
TLDR: Make `gst_set_threshold_from_string ("", TRUE)` reset *all*
threshold settings, including those set by previous invocations of
`gst_debug_set_threshold_from_string`.

The docs say:

    @reset: %TRUE to clear all previously-set debug levels before setting
        new thresholds

What actually happens is it sets the default threshold to `ERROR`,
leaves the patterns in place and calls
`gst_debug_category_reset_threshold` on each category.

In effect, any category that is matched by a pattern gets reset to that
threshold if the app changed it by directly invoking
`gst_debug_category_set_threshold`. All other categories are reset to
`ERROR`.

In my opinion this parameter currently has little value, as the same
effect can be achieved by including `ERROR` (without a pattern) in the
string, as in `"foo*:WARNING,*bar:INFO,ERROR"`.

What I actually expect it to do is reset *all* threshold settings,
including those set by previous invocations of
`gst_debug_set_threshold_from_string`, starting off with a clean slate
for the patterns provided with the call.

Otherwise there is no API to do this, besides:

  - Painfully removing patterns one-by-one via
    `gst_debug_unset_threshold_for_name` *if* you know what the patterns
    are.
  - Adding a `*:FOO` pattern to affect all categories, which makes the
    default threshold useless and practically leaks all the old
    patterns.

In my opinion this also makes it fit better into the layers of threshold
config, which is:

1. Temporary:
  - `gst_debug_category_set_threshold`
  - `gst_debug_category_reset_threshold`
2. Patterns:
  - `gst_debug_set_threshold_for_name`
  - `gst_debug_unset_threshold_for_name`
  - `gst_debug_set_threshold_from_string`
  - `GST_DEBUG`
3. Default:
  - `gst_debug_set_default_threshold`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>
2022-11-07 14:49:44 +00:00
Edward Hervey 605cb6a4d4 gstpad: Avoid race in (un)setting EOS flag on sinkpads
The scenario is the following:

* Thread 1 is pushing an EOS event on a sinkpad
* Thread 2 is pushing a STREAM_START event on the same sinkpad before Thread 1
returns. Note : It starts pushing the event after Thread 1 took the object lock.

There is a potential race between:

* The moment Thread 1 sets the EOS flag once it has finished sending the
event (via store_sticky_event). When it does that it has both the STREAM and
OBJECT lock

* The moment Thread 2 sends the STREAM_START event (Which should release that
EOS status), but removing the EOS flag is only done while holding the OBJECT
lock and not the STREAM_LOCK, which means it could be re-set by Thread 1 before
it then checks again the EOS flag (without the STREAM lock taken).

The EOS flag unsetting by STREAM_START should be done with the STREAM lock
taken, otherwise it will be racy.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3320>
2022-11-07 06:28:39 +01:00
Tim-Philipp Müller 62f8d292a1 gst-inspect: print doc urls for Rust plugins
We have documentation for them now after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3346>
2022-11-06 18:10:44 +00:00
Tim-Philipp Müller 04581fad6a identity: fix "handoff" signal docs
The docs list an extra pad argument, which doesn't
match the actual signal function signature. Probably
a copy'n'paste mistake when copying things from fakesink.

Fixes #1546

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3337>
2022-11-05 11:58:34 +00:00
Edward Hervey 730ed3a69a gstpad: Fix non-serialized sticky event push
With non-serialized sticky events, such as GST_EVENT_INSTANT_RATE, we both want
to store the event (for later re-linking) *AND* push the event in a non-blocking
way.

We therefore must *not* propagate pending sticky events if the event is "sticky
or serialized" but only if it's "serialized"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3254>
2022-11-04 14:20:36 +00:00
Michael Gruner 2cdfa8f419 parse: do delayed set only if the target child was not found and fail otherwise
When using the child proxy notation (child::property=value) it may
happen that the target child does not exist at the time of parsing
(i.e: decodebin creates the encoder according to the contents of the
stream). On this cases, we want to delay the setting of the property
to later, when new elements are added. Previous logic performed a
delayed set even if the target child was found but the property
was not found in it. This should be treated as a failure because,
unlike missing elements, properties should not appear dynamically.
By not failing, typos in property names may go unnoticed to the end
user.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>
2022-11-02 13:21:09 +00:00
Michael Gruner ded2fed3b9 childproxy: Implement a new ::get_child_by_name_recurse() API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>
2022-11-02 13:21:09 +00:00
Sebastian Dröge c878d0f68b core/base: Only post latency messages if the latency values have actually changed
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1525

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3282>
2022-10-27 15:25:22 +00:00
Edward Hervey cb1345ab77 concat: Properly propagate EOS seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3284>
2022-10-27 11:20:01 +02:00
Sebastian Dröge 366893e9ac Fix various warnings from gobject-introspection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>
2022-10-25 09:45:25 +03:00
Seungha Yang e25a6f4794 gst-inspect: Hide GST_PARAM_DOC_SHOW_DEFAULT flag
It's known flag but only for documentation purpose. Don't show
its (and user cannot understand) value 0x2000

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3241>
2022-10-24 17:14:48 +00:00
Sebastian Dröge fee144bca5 net: Add missing nullable annotation on the name parameter in the net/NTP clock constructors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3249>
2022-10-22 15:59:16 +00:00
Seungha Yang 249790fa59 padtemplate: Fix annotations
gst_caps_replace() does not take ownership of the new caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3248>
2022-10-22 22:06:13 +09:00
Seungha Yang 7bc5ed34fd gst-inspect: Don't print link to doc if it's known to be unavailable
"gst_element_factory_get_skip_documentation() == true" means
documentation was intentionally skipped for the element feature

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3243>
2022-10-22 05:36:38 +09:00
François Laignel a5f3ccc037 gst: uri query: fix inconsistent uri nullability assertion
Functions `gst_query_set_uri` and `gst_query_set_uri_redirection`
can both set a `NULL` `uri`, as annotated in the documentation.
However the functions bodies reject `NULL` `uri`s.

See [1] for a discussion on that matter.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1134#note_1600988

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3237>
2022-10-21 15:05:48 +00:00
Thibault Saunier dbed9978ac docs: plugins-scanner: Handle interface used for plugin API properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3236>
2022-10-21 09:14:25 +00:00
Seungha Yang 09fc6f14f3 docs: plugin-scanner: Stop updating "long-name" metadata
The "long-name" value can be environment dependent, and it's not
actually used by our documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3208>
2022-10-20 10:38:19 +00:00
Seungha Yang fcde6af7df parse: Adjust debug log level
That's not an error case at all

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3228>
2022-10-19 18:43:53 +00:00
Sebastian Dröge c7080b1626 {element,deviceprovider}factory: g_object_new() can't ever return NULL
So treat it as the assertion it is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Sebastian Dröge 4f03dbd37c elementfactory: Handle element factory loading failure in gst_element_factory_create_valist() not as assertion
In gst_element_factory_create_with_properties() it is a normal error
path so let's keep this consistent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Sebastian Dröge 3ceee904dc gst: Use G_TYPE_INVALID instead of 0 for GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Mathieu Duponchelle f0598767f0 tests: parse-launch: remove assignment order tests
These tests relied on setting the name of an element twice to verify
that the last one set took precedence, however name is a CONSTRUCT property
and the parser now errors out when such properties are set twice, in
g_object_new_with_properties .

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3026>
2022-10-19 11:21:04 +00:00
Mathieu Duponchelle c2f890aba7 parse: refactor to make use of gst_element_factory_make_with_properties
Instead of creating the element first, then setting properties and
presets, we gather those and construct the element with the properties.

This means users of gst_parse_launch can now set construct-only
properties.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3026>
2022-10-19 11:21:04 +00:00