829 Commits

Author SHA1 Message Date
Sebastian Dröge
6877ca4d62 pipeline: Store the actual latency even if no static latency was configured
Previously the latency was only stored if a static latency was configured on the
pipeline, which caused gst_pipeline_get_configured_latency() to always return
GST_CLOCK_TIME_NONE in that case.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8972>
2025-05-17 08:58:58 +00:00
Sebastian Dröge
08c56f3e2d element: ref-sink the correct pad template when replacing an existing one
templ is the new one that is being stored and that needs to be ref-sinked,
padtempl is the old one that just needs to be unreffed.

Fixes leaking the old template, and also makes sure that the new template is not
floating which can cause use-after-frees with bindings as they might wrongly
take ownership of a still floating template.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8988>
2025-05-16 17:47:47 +00:00
Jordan Petridis
17d271057a core: suppress glib_init_ctor as well
We already suppress gobject_init_ctor and this
is the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8979>
2025-05-15 15:21:20 +00:00
Doug Nazar
d3658eef72 controller: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:47:37 -04:00
Doug Nazar
80072383c5 directcontrolbinding: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:46:34 -04:00
Doug Nazar
5867c7900a all: Annotate *_set_property() contructor only props without free
Properties that are marked constructor only aren't required to be freed
before g_value_dup_*() as they can only be called once during construction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:15:21 -04:00
Xavier Claessens
cff1d1962b gstmessage: Debug error message is nullable
When debug is NULL, gst-launch-1.0 won't print
"Additional debug info:" line.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8943>
2025-05-10 22:13:22 +00:00
Santosh Mahto
700b665bf7 gstanalytics: Add transform function to copy the tensor meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8825>
2025-05-10 20:58:52 +00:00
Tim-Philipp Müller
128710caab meson: rename meson_options.txt to meson.options
Which is supported since Meson 1.1:
https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8651>
2025-05-03 10:38:25 +01:00
Nirbheek Chauhan
2c39756b24 gst-ptp-helper: Fix meson warning about rust_crate_type
WARNING: Project targets '>= 1.4' but uses feature deprecated since
'1.3.0': rust_crate_type arg in static_library. Use rust_abi or
rust.proc_macro() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8753>
2025-04-30 10:18:57 +00:00
Sebastian Dröge
df46cfcb28 aggregator: Don't produce buffers when live but not in PLAYING yet
Especially in force-live=true mode it was possible to produce buffers before the
element was set to PLAYING as long as a clock was available already.

This could easily lead to outputting buffers too early, and e.g. before the
correct base time is set and available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8897>
2025-04-26 11:08:12 +03:00
Sebastian Dröge
b05a498187 aggregator: Check after waiting if we're still running and otherwise stop
Previously we might've produced a buffer needlessly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8897>
2025-04-26 11:07:27 +03:00
Thibault Saunier
33f58f9da7 gst: debug: Add information about active tracers in dot files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8820>
2025-04-24 13:06:55 +00:00
Thibault Saunier
476bd6109e macos: Move macos function documentation to the .h so the introspection has the information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8854>
2025-04-22 19:25:30 +00:00
Thibault Saunier
d1f43f781a tracerutils: Do not warn on empty string as tracername
It doesn't matter if there is an "empty tracer" specified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8860>
2025-04-17 18:40:05 +00:00
Shengqi Yu (喻盛琪)
b144375974 pluginloader: fix pending_plugins Glist use-after-free issue
When plugin_loader_load_and_sync returns false in plugin_loader_replay_pending,
the cur Glist l->pending_plugins will be added to the blacklist.
However, the l->pending_plugins might have already been loaded and freed in handle_rx_packet,
so causing a use-after-free issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8747>
2025-04-16 05:06:40 +00:00
Mathieu Duponchelle
d1b4104cbc aggregator: expose current-level-* properties on sink pads
As aggregator internally queues data (up to latency), those properties
are helpful to monitor queue levels in the complete pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8731>
2025-04-08 17:26:34 +00:00
L. E. Segovia
0d7ea661cf cmake: Fix using pkgconf for Windows cross builds
pkgconf has its own default logic on Windows for setting up a prefix,
which does not match the default behaviour of pkg-config (blindly
respecting modules' ${prefix} variable).

See
dcf529b83d

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8768>
2025-04-05 01:15:06 +00:00
L. E. Segovia
8453993afc cmake: Fix PKG_CONFIG_PATH formatting for Windows cross-builds
The PKG_CONFIG_PATH use of semicolons must match the host system, not
the build system. This fixes calling pkg-config for Windows to Android
cross builds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8768>
2025-04-05 01:15:06 +00:00
Seungha Yang
7d51dc615d pluginloader-win32: Fix helper executable path under devenv
lpApplicationName argument of CreateProcessW should be complete path
of executable.

Fixing regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8614

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8746>
2025-04-01 19:04:01 +00:00
Guillaume Desmottes
4e65d16bfc gstvalue: add hashing
Will be used to implement the Hash trait in gstreamer-rs, see
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1639

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8518>
2025-04-01 14:38:01 +02:00
Guillaume Desmottes
bde69a4fab taglist: add _gst_tag_list_structure() as internal API
Will be needed to implement hash on GValue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8518>
2025-04-01 14:37:26 +02:00
Guillaume Desmottes
76e9e4ceb6 gstvalue: rename internal table to gst_value_hash_table
Will use the gst_value_hash symbol to implement a new method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8518>
2025-04-01 14:37:26 +02:00
Doug Nazar
86161c084e tracer: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
5f90a4ae67 all: Annotate *_set_property() contructor only props without free
Properties that are marked constructor only aren't required to be freed
before g_value_dup_string() as they can only be called once during construction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Guillaume Desmottes
1ea4632668 tracers: dots: fix debug log
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8699>
2025-03-27 04:09:51 +00:00
David Smitmanis
f8f75503b7 pluginloader-win32: Correctly handle whitespace paths when executing gst-plugin-scanner
On Windows, if the path to gst-plugin-scanner.exe contained
whitespace, gstreamer would via CreateProcessW attempt to execute
several files "up" the path tree; e.g. if the scanner path was
"C:\Program Files\gstreamer app\gst-plugin-scanner.exe", it would try
to execute C:\Program, C:\Program.exe, C:\Program Files\gstreamer.exe"
and so on.

This is how CreateProcessW behaves with unquoted whitespace arguments
in lpCommandLine if lpApplicationName is NULL.

By passing the binary path as lpApplicationName instead, the problem
is avoided.

Also quote arguments to gst-plugin-scanner.exe as they are paths as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8614>
2025-03-25 21:58:00 +00:00
Marc Leeman
f2b5c0b602 meson.build: test for and link against libatomic if it exists
It's needed on some platforms for some subset (or all) atomic operations and
checking for the cases when it's actually needed is quite complex.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8637>
2025-03-14 15:12:33 +00:00
Branko Subasic
2f2b19be83 tracer: Make it compile when tracer hooks are disabled
The GST_TRACER_POOL_BUFFER_(DE)QUEUED macros used when tracer hooks are
disabled took only one argument, causing compile errors when building
with tracer hooks disabled.

Change-Id: I0958c0b018f1fc4a6d84ab0bdd9e42895ae1fe77
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8638>
2025-03-14 11:07:03 +00:00
Thibault Saunier
9979936703 tracer: Add a hook to track when buffers are queued/dequeued in pools
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8617>
2025-03-12 14:49:22 +00:00
Tim-Philipp Müller
1a971d8e12 Back to development in main branch after 1.26.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8621>
2025-03-12 14:21:08 +01:00
Tim-Philipp Müller
d31ce8e5e1 Release 1.26.0 2025-03-11 20:20:16 +00:00
L. E. Segovia
c963597525 cmake: Memoize include checks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8478>
2025-02-26 12:22:23 +00:00
Thibault Saunier
ff15682f0a docs: Add a way to specify extra_assets path for plugins doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8545>
2025-02-25 20:06:12 +00:00
Thibault Saunier
6d83673132 tracer: dots: Check that pipeline-snapshot::dots-viewer-ws-url exists
It is a very new property and the tracer should still be usable if that
property doesn't exist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8547>
2025-02-24 20:04:49 +00:00
Tim-Philipp Müller
644a005ecb Back to development after 1.25.90 2025-02-23 23:52:57 +00:00
Tim-Philipp Müller
94a3e912ab Release 1.25.90 2025-02-23 23:44:10 +00:00
Tim-Philipp Müller
9cd9db2b77 gstreamer: update translations 2025-02-23 23:44:02 +00:00
Thibault Saunier
0155655854 tracers: dots: Simplify the way we check dot file to be removed
Fixing removing dot files that are in the root directory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8521>
2025-02-20 13:50:59 +00:00
Thibault Saunier
c3bf39e7a4 tracer: Add memory init/free hooks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8510>
2025-02-20 12:48:45 +00:00
Guillaume Desmottes
368492ba88 gstvalue: fix leak in gst_value_deserialize_bytes()
The GValue needs to take ownership.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8515>
2025-02-19 19:12:55 +00:00
Guillaume Desmottes
1b04ec5cb2 gstvalue: fix leak in gst_value_deserialize_g_date_time()
gst_date_time_to_g_date_time() does not take ownership.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8515>
2025-02-19 19:12:55 +00:00
Sebastian Dröge
a4a1de05f1 gstreamer: Fix various gobject-introspection warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8501>
2025-02-18 12:02:55 +00:00
Sebastian Dröge
f902f70659 buffer: Mark gst_buffer_extract() size parameter as in-parameter
Otherwise it's considered an out-parameter because of its relationship with
the dest array pointer.

Suggested-by: Sergey Bugaev <bugaevc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8494>
2025-02-18 08:16:19 +00:00
Xavier Claessens
f25668a223 gststructure: Fix deserialization of GStrv
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8438>
2025-02-17 08:31:36 +00:00
Xavier Claessens
e06e977304 gstvalue: Add (de)serialize of G_TYPE_STRV
This allows setting strv properties from gst-launch-1.0, such as uris in
uriplaylistbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8438>
2025-02-17 08:31:36 +00:00
Thibault Saunier
174460770b gst: Allow tracers to set the GST_DEBUG_DUMP_DOT_DIR
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7999>
2025-02-15 18:01:37 +00:00
Thibault Saunier
642ad6c927 tracers: Add a dots tracer which is meant to be used with gst-dots-viewer
See documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7999>
2025-02-15 18:01:37 +00:00
Thibault Saunier
4b74819671 core: debugutils: Write dot files atomically
Replace fopen/fputs with g_file_set_contents() to ensure dot files are written
atomically. This prevents tools like gst-dots-viewer from reading partially
written files when watching the dot folder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7999>
2025-02-15 18:01:36 +00:00
Alicia Boya García
ee97c89c51 gstreamer: parse: Log bus error messages during construction
Suppose you invoke gst-launch with this invalid pipeline:

```
$ gst-launch-1.0  videotestsrc num-buffers=10 ! x264enc name=enc ! mux.sink_0 \
    mpegtsmux name=mux ! fakesink
0:00:00.018631594 351169      0xb523090 ERROR           GST_PIPELINE
subprojects/gstreamer/gst/parse/grammar.y:1151:gst_parse_perform_link:
could not link enc to mux
WARNING: erroneous pipeline: could not link enc to mux
```

The error message you get is not very helpful. This is a pity, because
this is where the error comes from:

```c
static GstPad *
gst_base_ts_mux_request_new_pad (GstElement * element, GstPadTemplate * templ,
    const gchar * name, const GstCaps * caps)
{ // [...]
    GST_ELEMENT_ERROR (element, STREAM, MUX,
        ("Invalid Elementary stream PID (0x%02u < 0x40)", pid), (NULL));
    return NULL;
```

mpegtsmux posted an error with an explanation of why the linking failed.
However, since the error ocurred within gst_parse_launchv(), gst-launch
could not have set a bus handler, and the error message got discarded.

This patch attempts to make gst-launch more user-friendly by setting a
temporary bus handler during early bin construction to catch error
messages like this.

The errors are logged as ERROR level in the GST_PIPELINE category.
However, this is not enough, as GST_LEVEL_DEFAULT defaults to
GST_LEVEL_NONE in releases. In other words, outside of the dev
environment, GStreamer won't print ERROR logs by default.

To make sure the errors can reach users of packaged versions of
GStreamer, a new AtomicRcBox-based struct is added: reason_receiver_t.
graph_t owns a reference to reason_receiver_t and so does the temporary
bus handler.

When the temporary bus handler receives an error message, the `reason`
field of `reason_receiver_t` is filled with the error message.
Later, when SET_ERROR() is called as a consequence of the operation that
posted the error having returned failure, the reason message is
extracted and added to the GError message.

This is how the resulting error would look in the example from above:

    WARNING: erroneous pipeline: could not link enc to mux --
    GstMpegTsMux <mux> posted an error message: Invalid Elementary
    stream PID (0x00 < 0x40)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8417>
2025-02-15 00:04:46 +00:00