122936 Commits

Author SHA1 Message Date
Thibault Saunier
8d2612a056 ges: validate: Fix konwn issue synthax
It somehow passed undetected on the CI

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9602>
2025-08-23 13:21:21 +00:00
Thibault Saunier
5376a1d5e2 ges: validate: Respect the mute argument
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9602>
2025-08-23 13:21:20 +00:00
Sebastian Dröge
9f19e0e0a2 gst: Convert is_writable() / make_writable() macros to inline functions
Plus actual functions that are exported from the library.

Apart from improving type-safety, this also makes bindings more happy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9588>
2025-08-23 12:42:12 +00:00
Daniel Morin
c2d83fabbd tensordecoders: fix wrong assumption in ultralightfacedetectortensordec
- UltraLightFaceDetection was assmuming only one TensorMeta could be attach to
  buffer. We need to look at all TensorMeta attach to the buffer and check for
  the one it support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +00:00
Daniel Morin
3116ecc970 analytics: update gir
- update gir file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +00:00
Daniel Morin
3eefb6c5db analytics: always add GstTensorMeta
Always add GstTensorMeta to buffer instead of re-using existing GstTensorMeta
when it's already present. The reason for the change is when we have cascaded
inference elements overwriting (tflite) or leaking (ONNX) GstTensorMeta when we
have cascaded inferences. We didn't create and API to append to GstTensorMeta
and I think it's more convenient to have a new GstTensorMeta for each
inferences. It's also more clear that a group of tensor was produced by one
inference but doesn't limit tensordecoders from using tensors produced by
multiple inference. I don't see much value in having all tensors data always
inside one GstTensorMeta since appending would mean re-allocation of the tensors
array anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +00:00
Seungha Yang
0f4bddc9a9 wasapi2: Add support for format negotiation
Enumerate supported formats during open so that src/sink can
report them via get_caps(). The format is then fixated and
initialized on acquire(), allowing users to select their
preferred format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
d9279a5145 wasapi2: Enumerate supported shared mode formats
... and report it via device provider property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
c97ed1e6f6 wasapi2: Workaround for S24_32LE format mismatch
Since Windows 24bit-in-32bit format is not supported
by GStreamer (Windows one is MSB-aligned), converts format
in ringbuffer using SSE2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
0d94713288 wasapi2: Demote S24_32LE in exclusive-mode format ordering
Some endpoints accept 24-bit in 32-bit PCM (S24_32LE) in exclusive mode
but playback at very low volume. Until the root cause is identified,
push S24_32LE to the end of the candidate list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:27 +00:00
Seungha Yang
f2aabd6a71 wasapi2: Add support for exclusive mode device switching
Because of APO/OS mixer bypass in exclusive mode, we should
convert samples if new device has different format.
The conversion with additional buffering is implemented in this patch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:26 +00:00
Seungha Yang
4257cd8546 wasapi2: Fix process loopback device init
Fix AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM flag usage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:26 +00:00
Seungha Yang
18b5398960 wasapi2: Add support for exclusive mode
Add "exclusive" property and try exclusive mode streaming

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:25 +00:00
Seungha Yang
370499875c wasapi2: Probe exclusive mode formats
... and report it via device provider props

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:25 +00:00
Stéphane Cerveau
34a009d85c tests: add vulkan AV1 encode test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8841>
2025-08-21 17:42:47 +00:00
Stéphane Cerveau
167e41c343 vulkan: add basic AV1 encode support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8841>
2025-08-21 17:42:47 +00:00
Julian Bouzas
ea133d97a0 lcevcdec: Support all available formats
RGB and GRAY formats are only placeholders in LCEVCDec and therefore are not
supported yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
3fc37b90e1 lcevcdec: Remove unneeded LCEVC 2.0.0 workaround
This is not needed anymore as the min version for LCEVCdec is 4.0.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
30aa1e84e4 lcevcdec: Handle pixel aspect ratio and crop size correctly
LCEVCdec supports different pixel aspect ratios other than 1/1. This change
forwards the pixel aspect ratio of the base picture to the LCEVC decoder,
and also updates the output pixel aspect ratio caps base on the one from the
enhanced frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
d66213bfa3 lcevcdec: Peek the decoder for output resolution
The output resolution is not always twice as big as the input resultion divided
by the pixel aspect ratio. This is the case for LCEVC '0D' mode, where the
output resolution is the same as the input resolution, and the only enhancement
is the picture being clearer.

This patch uses LCEVC_PeekDecoder() after sending the LCEVC enhancement data to
know what the output resolution will be before allocating the output picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:54 +00:00
Julian Bouzas
3208d6c62a lcevcdec: Fix LCEVC picture access flags
Even though the LCEVC decoder works fine without this, it is recommended to
set read access to base pictures that are sent to the decoder, and write access
to enhanced pictures that are received from the decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:54 +00:00
Julian Bouzas
265b69520a lcevcdec: Fix width type typo
This was always meant to be gint instead of gint32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:53 +00:00
Vivienne Watermeier
54d28569b2 baseparse: don't clear most sticky events after a FLUSH_STOP event
Clearing sticky events - besides EOS, STREAM_GROUP_DONE, and SEGMENT -
risks losing them if a flush occurs before we get another buffer.

Also adds a unit test: parser_sticky_events_after_flush

Fixes #4193

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9506>
2025-08-21 11:00:36 +00:00
Víctor Manuel Jáquez Leal
fc647552fa vulkan: enable video maintenance2 for inline session parameters
.. in decoders.

Inline session parameters allows to not create session parameters handlers for
every new stream parameters (such as SPS and PPS for H.264, for example), but
instead to pass them as a chained structure in the decoding main structure. This
is completely align with GStreamer decoder base classes.

Even that the previous approach is kept, if the devices doesn't support video
maintenance2, it shows a lot of validation errors.

Also it was required to add another parameter when enabling extension to verify
if the extension is linked with a device feature and if it is enabled.

Bump Vulkan API (and driver version for both decoders and encoders) to 1.4.306

Also bumped the ABI_CHECK_TAG because the CI finally catches up with the vulkan
video symbols that are not exposed by a public header (tough they are binary
public).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
2025-08-21 05:22:19 +00:00
Víctor Manuel Jáquez Leal
8ce2ed05ac vkvideo-private: remove unused guards
Since this file is compiled only if vulkan video support is enabled with the
proper vulkan headers version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
2025-08-21 05:22:19 +00:00
Víctor Manuel Jáquez Leal
1d60643a1a vkdevice: check for features when enabling extensions
Some extensions need to have enabled certain feature in the device. This patch
does that check by adding a new field in the extension list which is a function
that can be mapped to gst_vulkan_physical_device_has_feature_*() functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
2025-08-21 05:22:18 +00:00
Víctor Manuel Jáquez Leal
caae3b07e1 vkimagesbufferpool: another usage for non-independent profile flag
Fix validation issue VUID-VkImageCreateInfo-flags-08329 on old RADV hardwware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9591>
2025-08-20 20:11:24 +02:00
Víctor Manuel Jáquez Leal
48dd6aee51 vulkanh265dec: fix validation layer complain
Silence the validation VUID-VkImageMemoryBarrier2-srcAccessMask-03915

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9591>
2025-08-20 20:11:18 +02:00
Ian Napier
aee742223c decklinkvideosrc: fix decklinkvideosrc becomes unrecoverable if it fails to start streaming
See #2611

When transitioning to PLAYING we call IDeckLinkInput::StartStreams() (via GstDecklinkInput::start_streams). This can
fail for various reasons, including if the hardware device is already in use.

Previously, we logged StartStreams() failure as an element error but otherwise continued to successfully transition to
PLAYING. Now, if StartStreams() returns an error we fail the state change.

If StartStreams() fails then a subsequent call to StopStreams(), when transitioning PAUSED to READY, will also fail.

Previously, if StopStreams() failed then the state change also failed. Unfortunately this prevented the element from
later being disposed, which in turn meant the associated hardware resources was never freed. Consequently, if a
decklinkvideosrc failed to transition PAUSED to READY, then the associated hardware device could not subsequently be
used by any other decklinkvideosrc.

Now, we log an element error if StopStreams() fails but otherwise consider the state change to have succeeded. This
means that the element can be disposed and the associated hardware resource released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9578>
2025-08-20 11:38:03 +00:00
Víctor Manuel Jáquez Leal
6d53576194 vkimagebufferpool: don't use independent profile flag for some usage
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, among others, needs the video profile
to use.

The patch clears the validation issue  VUID-VkImageCreateInfo-flags-08331

This is a continuation of !9550

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9570>
2025-08-20 06:37:03 +00:00
L. E. Segovia
2dd28e36e6 glib: update to 2.82.5 and backport shebangs patch
Fixes Meson 1.8 and higher's detection of the shebang for glib-mkenums
and glib-genmarshal.

See https://github.com/mesonbuild/meson/issues/14896

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9561>
2025-08-19 22:21:15 +00:00
Thibault Saunier
c8db458ce9 ges: Set framerate caps filter on the last time effect
The responsibility to change the framerate to the one
requested on the VideoTrack should always be the last time effect in it.

This introduces a new `capsfilter` at the end of video effect that
will be in passthrough most of the time.
t show

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:51 +00:00
Thibault Saunier
fac2d62054 validate: videorate: Update tests to use fakevideodec and fix race condition
There was a case where we could end up having more buffers on the sinkpads
than what was expected, depending on timings. This ensure that we have a fixed
number of buffers produced by the testsrc, and we play until EOS.

Replace theora encoder/decoder chain with fakevideodec for testing
QoS handling in videorate rate property tests. This simplifies the
test pipeline and removes dependency on theora codecs.

Also adjust test expectations to match RGBA format output from
fakevideodec instead of I420 from theoradec, and limit buffer
counts to make tests more deterministic.

This also fixes the rate we set for 2.0 test as we were actually testing
0.5 there.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:51 +00:00
Thibault Saunier
efdc9b1aea validate: scenario: Clear wait_message_action on stop
When executing a stop action, ensure that any pending wait_message_action
is cleared and unreffed to prevent it from being executed after the
scenario has been stopped. This prevents potential crashes or unexpected
behavior when stopping a scenario that has a pending wait action.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:51 +00:00
Thibault Saunier
fe6ad6f370 validate: scenario: Fix NULL context usage in action done callback
Use the local context variable that was retrieved earlier instead of
action->priv->context which is always NULL at this point since we
reset it right before. This ensures we invoke the callback on the
correct context.

And make sure that the wait message still has a reference when setting done
otherwise it is unref before calling the context invoke function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:51 +00:00
Thibault Saunier
f99bf2abee validate: Add support for overrides field in meta structure
Add support for an 'overrides' field in validatetest meta structures that
allows changing issue severity levels during test execution. This enables
tests to pass when encountering known issues by downgrading their severity.

The overrides field accepts an array of change-severity structures with:
- issue-id: The issue ID to override
- new-severity: New severity level (critical, warning, issue, ignore)

Currently only change-severity overrides are supported. The feature follows
the same pattern as expected-issues and is only available in .validatetest
files, not .scenario files.

Includes comprehensive documentation and a test case demonstrating the
functionality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:50 +00:00
Thibault Saunier
0b745f67db videorate: Convert input ts to output scale to close segment
Otherwise we compare values that are in two different time scales.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:50 +00:00
Thibault Saunier
e697fe98eb videorate: Bring all timestamp in the runtime scale when applying rate to QoS
Otherwise the timescale won't match and we might end up with totally broken
QoS events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:50 +00:00
Thibault Saunier
51d43529c3 videorate: Refactor so upstream/downstream time domains are properly decoupled
Refactor the videorate element to properly separate upstream and downstream
time domains when the `rate` property is set.

The previous implementation had issues with time domain conversions when
changing rates, especially during seeks after which we were basically confusing
input and output timestamps.

This also fixes rate changes as we are now tracking the wanted input timestamps
and not confusing them with the output, so this way we do not drop buffers when
the rate is changed while playing, meaning that the related tests have been
fixed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:49 +00:00
Thibault Saunier
242b4fa931 videorate: Handle the case where the base_ts is > qo.timestamp
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:49 +00:00
Thibault Saunier
d21c1f13d1 videorate: Do not fail setting caps on flushing pad
Avoiding to error out when flushing "at the wrong time" for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
2025-08-19 17:11:49 +00:00
Thibault Saunier
3715b0b7b8 debugutils: Use SHOW_FULL_PARAMS when GstDotsTracer is active
When the dots tracer is detected among active tracers, switch from
SHOW_ALL to SHOW_FULL_PARAMS to prevent parameter ellipsization.
The dots tracer is designed to work with gst-dots-viewer which can
handle long parameter values, so we preserve the full text in dot files.

This improves the viewing experience when using the dots tracer with
the gst-dots-viewer tool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:45 +00:00
Thibault Saunier
e87b3b0359 tracerutils: keep tracers that do not register to any hook alive as others
This checks if a tracer has registered to any hook after
initialization and automatically registers it to the "none" hook if not
so the lifetime of those tracer is the same as tracer who registers to hooks.

For example the `dots` tracer was being freed right after initialization
which was unexpected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:45 +00:00
Thibault Saunier
775187188d dots-viewer: Reindent and remove unused code in jquery.graphviz.svg.js
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:44 +00:00
Thibault Saunier
d3ad6136ef dots-viewer: Refactor JavaScript into modular architecture
Split monolithic embedded JavaScript in overlay.html into dedicated modules:
- tooltip.js: Custom tooltip functionality with interactive copy/paste mode
- pipeline-navigation.js: Clickable pipeline-dot references for navigation
- text-ellipsizer.js: Text ellipsizing with tooltip integration
- svg-overlay-manager.js: Main coordinator orchestrating all functionality

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:44 +00:00
Thibault Saunier
4d5fa1c43b dots-viewer: make pipeline dot references clickable for navigation
When GStreamer pipeline graphs contain references to other pipeline dot files,
users should be able to navigate between related pipeline views by clicking
on these references. This enables exploring complex pipeline hierarchies
where one pipeline references sub-pipelines.

The implementation detects text elements containing pipeline-dot references,
styles them as web links, and handles click events to navigate to the
referenced pipeline while preserving existing text selection and drag
functionality for other elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:44 +00:00
Thibault Saunier
28684cba1a dots-viewer: Make text copyable while preserving drag functionality
Enable text selection on SVG text elements by changing CSS user-select
properties from 'none' to 'text' and cursor from 'default' to 'text'.

Add JavaScript event handling to intercept mousedown events on text
elements, preventing dragscroll interference while allowing normal text
selection. This preserves the existing drag-to-pan functionality for
non-text areas while making text elements selectable and copyable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9547>
2025-08-19 15:34:44 +00:00
Olivier Crête
e37d5b7b74 rtpbasedepayload: Avoid potential use-after free
Clear the pointer after freeing the reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9579>
2025-08-19 09:15:03 -04:00
Havard Graff
162c4b0008 buffer: Fix gst_buffer_memcmp() / gst_buffer_memset() using wrong memory index
Regression from 160205b483dc7a1ae5da60d80a722837cf7c01d0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9565>
2025-08-19 08:18:17 +00:00
Vivian LEE
c4439a5b55 adaptivedemux2: fix crash due to log
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4588

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9573>
2025-08-19 07:20:13 +00:00