Commit graph

121506 commits

Author SHA1 Message Date
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
Mathieu Duponchelle
7983ecff1c docs: generate hotdoc configs for libraries with our helper script
With this patch, configure time is identical no matter whether doc is
enabled or not.

The configuration files also now contain explicitly-listed sources with
no wildcards.

For the four libraries where hotdoc needs to use clang to generate the
documentation (as opposed to the rest of the libraries where hotdoc uses
the gir), the script will call pkg-config to determine the appropriate
C flags.

This means a side effect of this patch is that pkg-config files are now
generated for the gstadaptivedemux and gstopencv libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:36:06 +01:00
Mathieu Duponchelle
17e53f8c95 meson: bump minimum version to 1.4 in every subprojects
36c01d0579 bumped to 1.4 for gst-devtools
and the root project, but we usually keep those in sync everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:22:34 +01:00
Mathieu Duponchelle
eeb3b7e683 docs: remove useless index.md in libs/ subdirectory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:22:34 +01:00
Mathieu Duponchelle
dce50d3320 docs: remove unused index.md file
It is a bit hard to track its origin as `git log --follow` leads all the
way to a 2001 Wim commit of a TODO file, but it was not used in the
documentation and the contained information appears in other places.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:22:33 +01:00
Thibault Saunier
aa78649635 videoconvertscale: Handle large pixel aspect ratios
Some pixel aspect ratios found in dash streams have very large numerators and
denominators (while being close to 1:1). These values can cause integer overflow
during multiplication, leading to negotiation failures.

Add fallback path using gdouble when integer multiplication would overflow,
trading some precision for reliability instead of failing outright.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8262>
2025-01-17 15:13:14 +00:00
Thibault Saunier
e77a16b2e6 gst: utils: Add a multiply_int64 variant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8262>
2025-01-17 15:13:14 +00:00
Sam James
c7a7eb1eb3 lc3: tweak meson style
While this might seem a bit silly, it aids some of our infra in
packaging. Tweak for consistency with other use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8239>
2025-01-16 20:09:06 +00:00
Stéphane Cerveau
ee7d41f76b vkh264dec: enhance interlaced content support
- Use frame_num instead of pic_num to set the long_term_pic_num
fixing 10 interlaced tests in fluster test suite: JVT-AVC_V1

- Send the slice offset only once in case of interlaced content.
Fixing 5 interlaced tests in fluster test suite: JVT-AVC_V1.

- The default value for top and bottom field flag should be 0 in the
case of a progressive content.

- Use short and long term refs helper getter method to retrieve the
reference frames according its none existing and interlaced state

- Reorganize the find_next_slot_idx code to be easier to read.

Co-authored-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7854>
2025-01-16 19:18:22 +00:00
Víctor Manuel Jáquez Leal
3090cefbc5 vkh264dec: enable h264 interlaced decoding
First the slot_index shall have the same value for the first and second
fields.

Also, the reference frames are only those with both fields.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7854>
2025-01-16 19:18:22 +00:00