Commit graph

8481 commits

Author SHA1 Message Date
Jordan Yelloz
2619a59f82 gstiterator: Added error handling to filtered iterators
Otherwise, if the underlying iterator returns GST_ITERATOR_ERROR, the filtered
iterator will crash.

With this change, the filtered iterator propagates the error back to the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8367>
2025-01-28 06:31:09 +00:00
Tomas Granath
49e4c0b451 oggdemux: Do not change total duration until new duration is found
After calculating a correct duration the oggdemux in some cases sets the duration to GST_CLOCK_TIME_NONE.
After that any seek will fail due to the oggdemux calculating a target time after the actual duration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8296>
2025-01-27 17:13:38 +00:00
Alicia Boya García
794ad2841a docs: Fix log category names in the log tracer
The documentation was incorrectly referring to `GST_QUERY` and `GST_BIN`
as GstDebug category names.  These two don't follow the pattern of the
rest, and instead are named `query` and `bin` respectively.

This can be verified from the source code of the _do_init macro in the
same gstlog.c file, and from gstbin.c and gstquery.c calls to
GST_DEBUG_CATEGORY_INIT().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8365>
2025-01-27 15:24:29 +00:00
Alicia Boya García
a6dcbf9446 tracers: log: Fix wrong argument in do_chain_buffer_pre()
The third argument of the pad-chain-pre and pad-chain-post hooks are of type GstBuffer* and GstBufferList* respectively.

However, when I added do_chain_buffer_pre() and do_chain_buffer_post()
to gstlog.c I accidentally make them take GstFlowReturn -- almost
certainly as an artifact from duplicating the code of the _post()
variants, leading to erroneous log lines like this:

```
do_chain_buffer_pre:<vp9parse0:sink> 0:00:01.615378540, pad=<vp9parse0:sink>, res=-1073639680
```

This patch fixes that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8366>
2025-01-27 14:44:02 +01:00
Alicia Boya García
6d9552295f tracing: add hooks for gst_pad_send_event_unchecked()
Similar to de30de865c, this allows to follow the flow of events as they
arrive to a pad rather than only when they are pushed to a peer.

The hook is installed in gst_pad_send_event_unchecked() instead of
gst_pad_send_event() because the latter is often omitted: that is the
case especifically in gst_pad_push_event_unchecked(), where most event
propagation occurs.

This patch also makes use of the new hooks in the log tracer to log the
begining and end of the send_event processing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8330>
2025-01-27 11:08:52 +00:00
Alicia Boya García
a35bf1e384 tracers: signal pad-push-event when pushing sticky events
Previously, the tracer pad-push-event was only signalled on
gst_pad_push_event().  However, the sticky event handling code in
GStreamer uses gst_pad_push_event_unchecked() instead, which meant those
events were not logged.

This patch extends the definition of the pad-push-event tracer to cover
both calls to gst_pad_push_event() and any direct calls to
gst_pad_push_event_unchecked() that skip the former inside GstPad
private code.

gst_pad_push_event_unchecked() returns GstFlowReturn instead of
gboolean like gst_pad_push_event(). To maintain API compatibility, the
GstFlowReturn is converted to gboolean.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8342>
2025-01-27 08:56:03 +00:00
Sebastian Dröge
fb2337ea82 netclientclock: Don't stop searching the clock cache when the first corrupted clock is found
The clock we're looking for might be working fine and be available afterwards.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8334>
2025-01-27 07:47:05 +00:00
Sebastian Dröge
dd58ae8cc8 netclientclock: Don't ever store failed internal clocks in the cache
If starting the internal clock fails we would still store a broken clock in the
cache despite it being unusable and never recovering.

Not storing it allows the application to simply create a new one at a later time
and have starting it retried.

Also signal to the application that such a clock is not synced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8334>
2025-01-27 07:47:05 +00:00
Brad Hards
154ea45111 taginject: typo fix in usage example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8362>
2025-01-26 20:21:58 +00:00
Arun Raghavan
4cd63e09d9 webrtcdsp: Use C++20 with MSVC if needed
The subproject fails on vs2022 builds with:

[...]agc2/input_volume_stats_reporter.cc(89): error C7555: use of designated initializers requires at least '/std:c++20'

So let's force C++20 in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8270>
2025-01-26 12:30:01 -05:00
Arun Raghavan
9b647a0bbd webrtcdsp: Bump to WebRTC AudioProcessing 2.1
Keep 1.0 support around so distros can manage this bump more easily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8270>
2025-01-24 15:53:36 -05:00
Andoni Morales Alastruey
432ada66f2 vtdec: fix seeks hangs due to a race condition draining
If the drain function of the decoder triggered by FLUSH_START
is run while the output loop is running, once the output loop
finished vtdec->downstream_ret will be GST_FLOW_FLUSHING instead
of GST_FLOW_OK, which must not be treated as an error since
the queue is cleaned correctly as well.

Fix #4179

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8328>
2025-01-24 17:36:17 +00:00
Thibault Saunier
26e6109b44 matroskademux: Add support to seek with stop in push mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8340>
2025-01-24 15:30:53 +00:00
Brad Hards
7f14c08918 x264enc: switch to GstByteWriter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8346>
2025-01-24 11:38:43 +00:00
Jochen Henneberg
73c61784d4 audiorate: Account for in buffer samples if fill samples are added
If fill buffers are added to compensate for missing samples the input
buffer is pushed as well and has to be added to output samples count.

This ensure that add - drop == out - in.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8358>
2025-01-24 09:12:50 +01:00
Rares Branici
345eae97d4 pluginloader-win32: create no window
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8354>
2025-01-23 19:48:28 +00:00
Silvio Lazzeretti
a6eb1de87d gstpluginloader-win32: fix use after free in find_helper_bin_location
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8352>
2025-01-23 19:28:54 +00:00
Matthew Waters
0b92e04142 cudacompositor: pass correct variable to debug log functions
Fixes spew of:

gst_debug_log_full_valist: assertion 'id != NULL ||
    object == NULL || G_IS_OBJECT (object)' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8345>
2025-01-23 17:18:46 +00:00
Guillaume Desmottes
0e3d6f0606 wpe: remove glFlush() when filling buffer
According to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4162#note_2739338
it was introduced as workaround for tearing issues.
I do not experience any tearing without flushing on both nvidia and AMD
GPU, so I suppose it's no longer needed.

Slightly improve CPU usage according to my tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8348>
2025-01-23 14:45:57 +00:00
Thibault Saunier
d7274f574c docs: rust: Fix link to rust documentation when in a rustdoc page
Current behavior is too weird as it points to the `libs.html` page
which is empty (as ?language=rust), instead we should stay on the
same page.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8350>
2025-01-23 10:29:32 -03:00
Thibault Saunier
58939e10ee docs: Embed the gstreamer-rs documentation into our documentation in CI
Downloading the latest build of GStreamer-rs from its CI job and running a
script to embed the rustoc generated documentation into hotdoc based one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8317>
2025-01-23 10:52:50 +00:00
Sebastian Dröge
55fa0a54a2 video-overlay-composition: Handle the SCALE meta transformation
Simply update the render rectangle according to the scale factor. As only the
render rectangle is changed, the seqnum of the rectangle stays intact and no
additional GPU uploads are necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8288>
2025-01-22 15:17:27 +00:00
Sebastian Dröge
8991140c5a video-overlay-composition: Declare the video/size/orientation tags for the meta
If any of these change then the meta needs to be updated one way or another.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8288>
2025-01-22 15:17:27 +00:00
Seungha Yang
dc81abe9ee cudacompositor: Fix memory leak
gst_cuda_compositor_upload_frame() returns buffers with increased
refcount already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8335>
2025-01-22 11:42:00 +00:00
Brad Hards
9b578abe15 h264parse: add conditional values to AVCConfigurationRecord
This adds the data required in AVCDecoderConfigurationRecord for
higher profile (High variants) configurations - everything in the if(...) {...} part
of ISO/IEC 14496-15:2024 Section 5.3.2.1.2. (or 5.3.3.1.2 in the 2019 version).

Resolves an error flagged by ComplianceWarden when muxing this into ISOBMFF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8308>
2025-01-22 15:58:21 +11:00
Brad Hards
105c3c7242 x264enc: add missing data to AvcDecoderConfigurationRecord
This adds the data required in AVCDecoderConfigurationRecord for
higher profile (High variants) configurations - everything in the if(...) {...} part
of ISO/IEC 14496-15:2024 Section 5.3.2.1.2. (or 5.3.3.1.2 in the 2019 version).

Resolves an error flagged by ComplianceWarden when muxing this into ISOBMFF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8308>
2025-01-22 14:03:55 +11:00
Alicia Boya García
e8ef562d01 tracers: log: Log buffer-chain
Commit de30de865c added a hook for pad-chain-{pre,post} and
pad-chain-list-{pre,post}. As explained in that commit, hooking the
chain is helpful because it allows you to hook to buffer propagation in
both srcpads (pad-push) and sinkpads (pad-chain).

This patch uses the new hooks to log pad-chain in the log tracer.
Before, only pad-push was logged, so you could only follow the flow of
buffers through the srcpads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8329>
2025-01-21 08:45:25 +00:00
Tim-Philipp Müller
4bd7e194f6 gst-libav: tests: fix build with older glib versions
g_newa0() is only available since 2.72.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8333>
2025-01-21 01:38:54 +00:00
Olivier Crête
86bac82c8e python: Add __eq__ to Mtd classes
Also programatically iterate all of the base classes to register them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8237>
2025-01-20 21:16:32 +00:00
Daniel Morin
ad4fa052e5 gst-python: Test for GstAnalyticsRelationMeta iterator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8237>
2025-01-20 21:16:32 +00:00
Daniel Morin
e294b1b773 analytics: Adding iterator for AnalyticsRelationMeta
Allow to create an iterator for Mtd's inside an AnalyticsRelationMeta

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8237>
2025-01-20 21:16:32 +00:00
Seungha Yang
d9510be7b1 docs: Update nvcodec plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8325>
2025-01-20 19:31:36 +00:00
Seungha Yang
c01ef564d9 cudaipc: Use empty string for address property docs
Since Windows and Linux have different default values,
use empty string when generating plugin docs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8325>
2025-01-20 19:31:36 +00:00
Seungha Yang
1f481fe1d5 nvcodec: Specify documentation caps
... since produced caps will be different depending on OS and GPU model.
Also adding Y444_16LE format to decoder's GL template caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8325>
2025-01-20 19:31:36 +00:00
Seungha Yang
06afe8aa8f docs: Add nvcomp plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8325>
2025-01-20 19:31:36 +00:00
Sebastian Dröge
03942ff5b4 tsdemux: Fix backwards PTS wraparound detection with ignore-pcr=true
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8326>
2025-01-20 17:57:31 +00:00
Thibault Saunier
2ff6a3ecb6 docs: doc-cache-generator: Pass the full os.environ so pkg-config can be found
We want to pass the `PATH` from the current environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8327>
2025-01-20 13:52:43 -03:00
Thibault Saunier
ed7b210ae7 docs: Make autopep8 happy for gst-plugins-doc-cache-generator.py
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8327>
2025-01-20 13:52:38 -03:00
Guillaume Desmottes
5b4eb339a3 sparsefile: ensure error is set when read_buffer() returns 0
gst_sparse_file_read() is supposed to set @error when returning 0 but
in some cases was not.

Hopefully fix a crash in gst_download_buffer_read_buffer() which is
checking error->code when 0 is returned.
I'm not totally sure when this happens as I debugged this from a post
mortem crash but returning a generic error here seems the safe thing to
do.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8321>
2025-01-20 13:33:10 +00:00
Guillaume Desmottes
60f4cd77d5 sparsefile: fix typo in doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8321>
2025-01-20 13:33:10 +00:00
Mathieu Duponchelle
b26a5ee088 docs: explicitly list gir files as depends for generating configs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8324>
2025-01-20 13:24:44 +01:00
Mathieu Duponchelle
45c4c6d7ed docs: only add configuration files to sitemap once generated
The generation script can fail to generate a configuration for the four
libraries where the documentation is not generated from gir, as it needs
to run pkg-config.

Only add the path to the configuration file to the sitemap once it has
successfully been dumped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8324>
2025-01-20 13:24:44 +01:00
Nirbheek Chauhan
29098aeba8 gstdevice: Fetch device provider from message source
The GstDevice removed may not have a parent anymore when we check
whether the provider is hidden. Let's fetch the provider from the
message source, which is more reliable.

Fixes a racy nullptr deref on macOS when a device is unplugged:

```
libgstreamer-1.0.0.dylib!is_provider_hidden (gstreamer/subprojects/gstreamer/gst/gstdevicemonitor.c:240)
libgstreamer-1.0.0.dylib!bus_sync_message (gstreamer/subprojects/gstreamer/gst/gstdevicemonitor.c:286)
libgstreamer-1.0.0.dylib!gst_bus_post (gstreamer/subprojects/gstreamer/gst/gstbus.c:358)
libgstreamer-1.0.0.dylib!gst_device_provider_device_remove (gstreamer/subprojects/gstreamer/gst/gstdeviceprovider.c:685)
libgstosxaudio.dylib!gst_osx_audio_device_provider_update_devices ([...]/sys/osxaudio/gstosxaudiodeviceprovider.c:539)
libgstosxaudio.dylib!_audio_devices_changed_cb ([...]/sys/osxaudio/gstosxaudiodeviceprovider.c:313)
CoreAudio!HALObject::PropertiesChanged(unsigned int, AudioObjectPropertyAddress const*) (Unknown Source:0)
CoreAudio!HALSystem::PropertiesChanged(unsigned int, AudioObjectPropertyAddress const*) (Unknown Source:0)
CoreAudio!HALSystem::ObjectsPublishedAndDied(...) (Unknown Source:0)
CoreAudio!HALSystem::AudioObjectsPublishedAndDied(...) (Unknown Source:0)
CoreAudio!HALC_ShellPlugIn::ReconcileDeviceList(bool, bool) (Unknown Source:0)
CoreAudio!HALC_ShellPlugIn::CreateAggregateDevice(__CFDictionary const*, unsigned int&) (Unknown Source:0)
CoreAudio!AudioHardwareCreateAggregateDevice_mac_imp (Unknown Source:0)
AudioDSP!___lldb_unnamed_symbol15046 (Unknown Source:0)
AudioDSP!___lldb_unnamed_symbol15038 (Unknown Source:0)
AudioDSP!___lldb_unnamed_symbol33307 (Unknown Source:0)
AudioToolboxCore!APComponent::newInstance(...) (Unknown Source:0)
AudioToolboxCore!instantiate(...) (Unknown Source:0)
AudioToolboxCore!__AudioComponentInstanceNew_block_invoke (Unknown Source:0)
AudioToolboxCore!Synchronously (Unknown Source:0)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8320>
2025-01-20 15:44:20 +05:30
Tim-Philipp Müller
f70e2f046c avaudenc: add test for misaligned audio input buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8318>
2025-01-20 08:58:01 +00:00
Tim-Philipp Müller
9b536630f1 avaudenc: fix crash in avenc_ac3 if input buffers are insufficiently aligned
Memcpy if needed to ensure sufficient alignment, as some
SIMD instructions might require more alignment than we provide
by default (e.g. vmovaps requires 32 bytes, but gstreamer uses
malloc alignment by default which is 16 bytes here on x86_64).
And in any case buffers might be trimmed, so the only alignment
we can expect is sample frame alignment which might be even
smaller than 16 bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8318>
2025-01-20 08:58:01 +00:00
Seungha Yang
289f63b6e7 nvcodec: Add cudacompositor element
Adding CUDA based compositor element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
2025-01-20 01:12:21 +09:00
Seungha Yang
875e137f4f cudaconverter: Add support for alpha blending
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
2025-01-20 01:12:21 +09:00
Seungha Yang
d761196bb7 cudaconverter: Add support for configuration update
Allow updating various configuration values via property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
2025-01-20 01:12:21 +09:00
Seungha Yang
1fa51046d1 cudaconverter: Pass constant values as kernel argument
Make conversion kernel more flexible and reusable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
2025-01-20 01:12:20 +09:00
Seungha Yang
1b6f66a840 cuda: Load 2D memset function symbols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
2025-01-20 01:12:20 +09:00