Commit graph

601 commits

Author SHA1 Message Date
Sebastian Dröge 0a2e0a4f64 buffer: Use C11 atomics if available for 64 bit atomic operations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6740>
2024-05-16 06:52:58 +00:00
Alexander Slobodeniuk 0e3e688bed systemclock: fix usage of __STDC_NO_ATOMICS__
__STDC_NO_ATOMICS doesn't seem to exist. In fact the only compiler
I've found that sets any of those is msvc, but it sets
__STDC_NO_ATOMICS__, not __STDC_NO_ATOMICS.

__STDC_NO_ATOMICS__ is the one documented by C11 standard.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6848>
2024-05-14 23:38:31 +02:00
Sebastian Dröge 9e58fa49f1 info: Use GstVecDeque for the ringbuffer logger instead of GQueue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6779>
2024-05-06 18:25:42 +00:00
Sebastian Dröge 0ef396359c gst: Move GstQueueArray as GstVecDeque to core
And change lengths and indices from guint to gsize for a more correct type.

Also deprecate GstQueueArray and implement it in terms of GstVecDeque.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6779>
2024-05-06 18:25:42 +00:00
Edward Hervey 9c10726ae1 gstvalue: Add a GstAllocationParams to String conversion
Avoids ending up with plenty of warnings when serializing GstStructure
containing GstAllocationParams

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6714>
2024-04-29 16:01:33 +00:00
Edward Hervey 777c8a9b15 structure: Add a serialization for GArray in GstStructure
Instead of constantly spurting out warnings in the log files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6691>
2024-04-29 11:05:44 +00:00
Xavier Claessens 364d0ff45d pad: gst_pad_set_offset is only reliable on source pads
Setting an offset on sink pads won't repush segment event which means
buffer running time won't be adjusted. Better warn about this than being
silently not working.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6464>
2024-04-25 13:49:03 +00:00
Johan Sternerup deddcbdc66 basesrc: protect segment_seqnum/pending with object lock
In a few places the object lock was not taken when writing to
segment_pending and segment_seqnum.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6671>
2024-04-22 18:13:46 +00:00
Johan Sternerup a3f8f036fe gstbasesrc: Do not hold LIVE_LOCK while sending events
An application that triggers a state transition from PLAYING to PAUSED
needs to acquire the LIVE_LOCK. Consequently the LIVE_LOCK must not be
taken while pushing anything on the pads because this operation might
get blocked by something that cannot be unblocked without the
application being able to proceed with the state transitions for other
elements in the pipeline. This commit extends the previous behaviour
where the live lock was released before pushing buffers (indirectly
through the unlock before subclass->create) to now also include
unlocking before pushing events.

The issue was discovered in a case for WebRTC where the application
tried to shut down a pipeline but an event originating from a video
source element (based on basesrc) was in the process of being pushed
down the pipeline when it got stuck on the STREAM_LOCK for the pad after
the rtpgccbwe element. This lock in turn was held by the rtcpgccbwe
element as it was in the process of pushing data down the pipeline but
was stuck on the blocking probes installed on dtlssrtpenc to prevent
data from flowing before dtls keys had been negotiated. What should have
happened here is that the blocking probes should be removed, but that
can only happen if the application may continue driving the state
transitions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6671>
2024-04-22 18:13:46 +00:00
Sebastian Dröge 9eb3ab3a59 ptp: Silence warning about some unused trait methods
These are not used yet but will likely be useful in the future.
Rust 1.79 (nightly) is warning about them being unused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6601>
2024-04-10 14:33:46 +00:00
Mark Nauwelaerts e019093fbf adapter: align documentation to actual behavior
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6535>
2024-04-04 16:55:35 +00:00
Xavier Claessens d129c8ebd3 clocksync: Proxy allocation queries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6515>
2024-04-03 03:58:10 +00:00
L. E. Segovia 6ce27e328d gst: clock: Block futex_time64 usage on Android API level < 30
This syscall is seccomp blocked on all lower API levels:

ee7bc3002d

While at it, also fix all direct tests on __NR_futex_time64 and
__NR_futex so that they refer to the results available in
config.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6477>
2024-04-02 15:32:37 +00:00
Sebastian Dröge 6d3ed65179 basesrc: Clear submitted buffer lists consistently with buffers
And handle the case of a NULL buffer being returned cleanly, which is
valid as long as a buffer list is returned instead. Previously this
would cause an assertion because of calling gst_buffer_unref() with
NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6460>
2024-03-27 16:16:10 +00:00
Taruntej Kanakamalla 6a67ae1bfa net/gstptpclock: fix double free of domain data during deinit
The attempt to free the domain data is happeing twice during the ptp deinit.
Once while iterating through the list domain_data and second while iterating
through the list domain_clocks, so this is crashing the application
trying to gst_ptp_deinit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6443>
2024-03-27 17:54:46 +05:30
Arnaud Vrac 258e9d2bca inputselector: fix possible clock leak on shutdown
Avoid leaking a GstClock object on shutdown, bail out before taking the ref when
not playing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6442>
2024-03-27 10:10:14 +00:00
Thomas Goodwin fde2495218 gst-inspect: fix --atleast-version to be implicitly applied to --exists
The --atleast-version implies --exists, but the implementation in
earlier commits had the version check applied any time the --exists was
checked, and the default value of the major and minor versions were set
to the GStreamer major and minor versions.  The resulting behavior would
have gst-inspect return '1' if the plugin's version didn't match
gstreamer's even when --atleast-version was not specified in the command
line args.  The change in this patch removes that behavior and adds
tests to verify that if --exists is specified WITHOUT --atleast-version
the version check will NOT be applied.  If both arguments are specified
and the version does not match the arg-supplied version number, a new
return code of '2' is used to uniquely identify the failure.

Fixes #3246

Signed-off-by: Thomas Goodwin <thomas.goodwin@laerdal.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6191>
2024-03-20 21:19:07 +00:00
Sebastian Dröge 6c3d09e279 ptp: Initialize expected DELAY_REQ seqnum to an invalid value
This allows distinguishing pending syncs that didn't have a DELAY_REQ
sent from ones that did but used a seqnum of 0, like the very first one.

Specifically, if the first one or more syncs are still pending and we
send the first DELAY_REQ for a later pending sync, then the DELAY_RESP
would've been wrongly associated to the very first pending sync because
of the seqnum.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6361>
2024-03-13 22:24:56 +00:00
Antonio Larrosa bd97973ce0 registry, ptp: Canonicalize the library path returned by dladdr
On systems using UsrMerge (like openSUSE or Fedora), /lib64 is
a symlink to /usr/lib64. So dladdr is returning the path to
the gstreamer library in /lib64 in priv_gst_get_relocated_libgstreamer.
Later gst_plugin_loader_spawn tries to build the path to the
gst-plugin-scanner helper from /lib64 and ends up trying to use
/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner which doesn't exist.

By canonicalizing the path with a call to realpath, gst-plugin-scanner
is found correctly under
/usr/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner

Similar change applied to gstreamer/libs/gst/net/gstptpclock.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6322>
2024-03-12 15:51:36 +00:00
Nirbheek Chauhan 77831d6142 gsturi: Sort by feature name to break a feature rank tie
This matches autoplug in other places such as decodebin, otherwise we
will pick "randomly" based on the order in which plugins are
registered, which is mostly dependent on the order in which readdir()
returns items.

So let's make it predictable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6227>
2024-03-12 14:25:10 +00:00
Jan Schmidt d3e79077dc identity: Don't refuse seeks unless single-segment=true
identity only needs to configure the internal seek segment if it's
aggregating upstream segments into 1. If it's not, don't break
other seek behaviour by refusing (for example) instant-rate change
seeks.

Fixes: #3363
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6299>
2024-03-08 17:07:25 +11:00
Jan Schmidt cca0bc31a7 gstsegment: Don't use g_return_val_if_fail()
Don't use g_return_val_if_fail() to catch the
open-ended segment or empty segment cases in
gst_segment_to_running_time_full()

g_return_val_if_fail() is for programmer errors,
and can be compiled out with a flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6219>
2024-03-06 14:48:50 +00:00
François Laignel 7b5a5afa3a ptp clock: fix annotations for gst_ptp_clock_new
* Set `name` as `nullable` same as for gst_ntp_clock_new.
* Set return value as nullable as the constructor can fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6251>
2024-03-06 12:17:17 +00:00
Sebastian Dröge 9ab9ceb964 ptp-helper: Fix clippy warning and simplify code a bit
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
   --> ../subprojects/gstreamer/libs/gst/helpers/ptp/main.rs:246:17
    |
246 | /                 match ptp_message.message_type {
247 | |                     PtpMessageType::DELAY_REQ => {
248 | |                         if args.verbose {
249 | |                             trace!("Ignoring our own PTP message");
...   |
253 | |                     _ => (),
254 | |                 }
    | |_________________^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6245>
2024-03-06 09:17:53 +00:00
Sebastian Dröge 8859f257c2 ptp: Don't install test executable
And handle it like all our other test executables.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6262>
2024-03-05 18:55:00 +00:00
Tim-Philipp Müller 756064b9c3 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6261>
2024-03-05 12:58:57 +00:00
Tim-Philipp Müller b125253cad Release 1.24.0 2024-03-04 23:59:25 +00:00
Edward Hervey a3980f4838 docs: Use Discourse and Matrix as prefered communication channels
Part of: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6220
2024-02-27 09:35:47 +01:00
Edward Hervey 760793e843 gitlab_template: Remove duplicate entry and remove mention of IRC
Part of: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6220
2024-02-27 09:35:41 +01:00
Arnaud Vrac 49fa99737b queue2: post 100% buffering message even when waiting for space to be freed
In the case where the queue shrinks due to a property change and the queue
becomes full, we would set the waiting_del flag, which would prevent posting the
100% buffering message on the bus. Since the pipeline is not aware of the new
buffering value, in the common case where the pipeline is paused during
buffering, it would never resume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 7293c313d4 queue2: move gst_queue2_get_buffering_message code to the only call site
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 15a18281d7 queue2: remove redundant check to avoid posting the same buffering value twice
Remove the percent_changed check to determine whether a buffering message should
be posted. The check on the last posted buffering value is sufficient, and the
removal doesn't introduce additional complexity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 517498dd11 queue2: consolidate buffering message posting code
No need to copy paste the code, simply call the common gst_queue2_post_buffering
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:07 +00:00
Arnaud Vrac 54aa6b66d8 queue2: make sure update_buffering is called with the lock taken
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:07 +00:00
Tim-Philipp Müller d474de8ff0 Release 1.23.90 2024-02-23 18:20:11 +00:00
Jochen Henneberg c6636533d4 ptp-helper: Allow sync to master clock on same host
If we drop all messages with the same clock id as ours we will also
drop all messages coming from a PTP clock on our host since both clock
ids are build from the same MAC address.

At least for Linux we do not see our own messages anyway since the
network stack can well distinguish between multicast send from our
socket or from another socket on the same machine. To make sure that
this works for all supported platforms just drop delay requests since
this is the only message that is sent from the GStreamer PTP clock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6172>
2024-02-22 07:52:35 +00:00
Tim-Philipp Müller 28f262b9ad gst-inspect: print plugin error/warning/info status messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3832>
2024-02-21 00:58:19 +00:00
Tim-Philipp Müller bc4f7040fa plugin: add API for plugins to provide status info messages
This can be used to store informational messages, errors or
warnings which can later be shown to the user in gst-inspect-1.0,
which can be useful for plugins that expose elements dynamically
based on external libraries or hardware capabilities.

Status messages can then provide an indication as to why a
plugin doesn't have any elements listed, for example.

Plus unit test to make sure code paths are exercised a little.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3832>
2024-02-21 00:58:19 +00:00
Tim-Philipp Müller 59c09eb029 gstobject: add CONSTRUCTED flag
This can be used later by base class APIs to know whether they're
called from a subclass instance init function (where the object
isn't properly constructed yet and one should only really poke
at the instance structure but not much else) or after object
construction has been finished.

Fix up GstBin unit test for CONSTRUCTED flag addition.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2794

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6150>
2024-02-20 19:16:54 +00:00
Edward Hervey 157471889e meta: Skip gst_meta_info_new in gir
```
gstmeta.c:500: Warning: Gst: gst_meta_info_new: return value: Invalid
non-constant return of bare structure or union; register as boxed type or (skip)
```

Skip this for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6147>
2024-02-20 12:30:39 +00:00
Philippe Normand 6059391e10 protection: Document original-media-type caps field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6142>
2024-02-19 18:35:03 +00:00
Guillaume Desmottes b4752ef792 docs: initialize values when GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS is set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5491>
2024-02-19 07:50:15 +00:00
Xavier Claessens 22b7200d60 bus: do not leak message on invalid handler return value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6124>
2024-02-15 18:37:48 +00:00
Xavier Claessens 57f12dd2fa bus: do not leak messages if there is no async handler
This does not typically happen because "enable-async" property is TRUE
by default. The only place where it is set to FALSE is in GstBin where a
sync handler is used and always returns GST_BUS_DROP.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6124>
2024-02-15 18:37:48 +00:00
Xavier Claessens 350345150e bus: warn when message queue grows too much
It usually means application is not handling messages causing memory
consumption to grow infinitely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3313>
2024-02-15 17:45:06 +00:00
Tim-Philipp Müller 88412ef100 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6126>
2024-02-15 16:38:53 +00:00
Tim-Philipp Müller 88751d4110 Release 1.23.2 2024-02-15 15:37:17 +00:00
Tim-Philipp Müller c127a4fd74 gstreamer: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6113>
2024-02-14 04:43:00 +00:00
Philippe Normand 1ecabcd1c5 taglist: Register new tag for container specific track ID
Unique identifier for the audio, video or text track this tag is associated
with. The mappings for several container formats are defined in the [Sourcing
In-band Media Resource Tracks from Media Containers into HTML
specification](https://dev.w3.org/html5/html-sourcing-inband-tracks).

Based on previous patch by Brendan Long.
Fixes #45

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6041>
2024-02-12 10:37:29 +00:00
Seungha Yang 75ddcd7566 pluginloader-win32: Early terminate if plugin loader binary is not installed
External plugin loader support for Windows is introduced
in this dev cycle. Since helper binary was not required (useless)
before this version, people may not ship the binary
with new GStreamer version, then they will observe warning message.

Instead of displaying the warning at plugin loading time,
checks helper bin earlier and disable external plugin loader
if helper binary is not installed.

Fixes: https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/448
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6083>
2024-02-11 13:49:34 +00:00