122519 Commits

Author SHA1 Message Date
Matthew Waters
f7ad5cb570 decklink/clock: remove clock_offset
It is completely unused and only ever initialized to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
2025-06-23 08:25:57 +00:00
Matthew Waters
cae2b38614 decklink: calculate internal using values closer to the current clock times
In a previous version of the clock time conversion code, scheduled playback used
to be started (from 0) when transitioning to PLAYING and stopped when
transitioning PLAYING->PAUSED. This worked fine when converting running times
using the internal clock.  However, now the decklink clock will produce values
that are monotonically increasing and do not reset to 0 at the same moments as
running time anymore. This means that the clock adjustments could attempt to
convert a small running time based on a large clock time e.g. after pausing
for many hours. As the adjustment code is a simple linear interpolation based on
the current clock times (large) using the provided value (small), the small
differences in the rate could result in very large differences in the
output time.

Fix by instead using both internal and external clock times based on the values
that gst_clock_get_calibration() will return. By doing so, small changes in the
rate calculations between the internal and external clock times will not result
in potentially large differences in the output internal time from
gst_clock_unadjust_with_calibration().

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
2025-06-23 08:25:57 +00:00
Nirbheek Chauhan
d432dbd106 docs: Document that unnecessary rebases make reviewing harder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9255>
2025-06-20 13:36:35 +00:00
Thibault Saunier
e799d79025 playsink: Fix race condition in stream synchronizer pad cleanup during state changes
Prevent race condition where gst_play_sink_do_reconfigure() could be called
from a pad probe while stream synchronizer pads are being released during
GST_STATE_CHANGE_PAUSED_TO_READY transition.

The race occurred when:
1. State change starts releasing stream synchronizer pads
2. Pads are unblocked earlier in the state change, allowing events to flow
3. A streaming thread triggers sinkpad_blocked_cb -> gst_play_sink_do_reconfigure
4. Reconfiguration tries to use already-released pad pointers
5. New pad creation fails with assertion in gst_pad_iterate_internal_links

The fix adds GST_PLAY_SINK_LOCK around the pad cleanup to ensure atomic
cleanup and prevent concurrent access during state transitions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9233>
2025-06-20 11:53:50 +00:00
Víctor Manuel Jáquez Leal
743c425f64 vulkanupload: refactor frame copy in a single function
Avoiding code duplication

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9222>
2025-06-20 11:08:17 +00:00
Víctor Manuel Jáquez Leal
bcf97b088f vulkanupload: use gst_video_frame_copy() for VulkanBuffer
There's no need of a custom copy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9222>
2025-06-20 11:08:17 +00:00
Doug Nazar
c0a86ebb30 adaptivedemux2: Fix race for expected error in test
After gst-validate-1.0 notices the first expected error on the bus, it will
queue the completion of that action while the pipeline is still processing the
error and getting to the basesrc for the second error.

Mark the second error as 'sometimes=true', as it's not critical to the test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
49a81965fc validate: Ignore error msgs when executing next action
When processing an expected error msg, the test for if the next action
was a message would trigger and we'd never execute the next action
causing a timeout.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
1fb195e08e validate: Fix memory leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
198498d3d2 validate: Pass correct argument size to va_arg function
sizeof(int) != sizeof (GType) and can cause an invalid access.
Also one function call was missing the terminator altogether.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
0f32647aae validate: Fix a memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
83be566ca7 validate: Reset mutex to NUL to allow re-init
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
76fc1d0acf validate: tests: use fixtures to init/deinit and fix leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
79321deb27 validate: cleanup several items on shutdown
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
b0885d2fc3 validate: Fix various memory leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
2f5ecdc911 validate: ensure we shutdown execute_actions source
Actions are no longer always called directly from the main loop
so we can't depend on G_SOURCE_REMOVE to remove it. It's also
possible while returning up the call chain after running stop
to try to re-add it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9118>
2025-06-20 00:27:57 +00:00
Doug Nazar
86795f6414 baseparse: test: Fix race on test start
It's possible that the sink pad is still flushing when the first buffer
is processed causing the test to timeout when we activate the sink after
starting the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9256>
2025-06-19 16:26:30 +00:00
Loïc Le Page
f47b0c0293 GstAudioAggregator: fix structure unref in peek_next_sample
The GstStructure attached to the audio sample in peek_next_sample() was
freed prematurely before usage as gst_sample_new() is taking full
ownership on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9248>
2025-06-19 15:25:11 +00:00
Pratik Pachange
1f5dbbbd0b v4l2object: Add support for colorimetry bt2100-pq and 1:4:5:3
Colorimetry bt2100-pq is a variant of colorspace V4L2_COLORSPACE_BT2020
where the transfer function is SMPTE 2084 which is used by HDR content.

Colorimetry 1:4:5:3 is a full-range variant of colorspace
V4L2_COLORSPACE_470_SYSTEM_BG

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9166>
2025-06-19 14:29:54 +00:00
Edward Hervey
bc0324f862 tsdemux: Allow access unit parsing failures
* Refactor the various Access Unit extraction calls into a single function
* Allow the access unit parsing to fail, but emit a warning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9246>
2025-06-19 13:03:16 +00:00
Nirbheek Chauhan
a8d9bfdcf2 amc: Overhaul hw-accelerated video codecs detection
Android 10 (API 29) added support for isHardwareAccelerated() to
MediaCodecInfo to detect whether a particular MediaCodec is backed by
hardware or not. We can now use that to ensure that the video hw-codec
is PRIMARY+1 on Android, since using a software codec for video is
simply not feasible most of the time.

If we're not able to detect isHardwareAccelerated(), perhaps because
the Android API version is too old, we try to use the codec name as
a fallback.

Also rank PRIMARY+1 the c2.android c2.exynos and c2.amlogic audio
codecs alongside OMX.google, because they are known-good.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
fb04ef5be3 amc: Log under GST_FIXME for audio encoders
We don't support audio encoders yet, so log that correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
966d8ec279 amc: Improve codec registration logging
Most of the messages can be printed with INFO threshold since they are
only printed on plugin registration.

Fix printing of codec caps, since GST_PTR_FORMAT truncates the output
in almost every case that I saw.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
b8c9884674 amc: Print error messages when registering plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Alicia Boya García
371100c743 tracers: Fix deadlock in latency tracer
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4317

This patch fixes a regression in
a35bf1e3847351703542869755b6b9e536b9d2fd.

The new calls to tracers in the affected change were being done while
holding the pad object lock, which wasn't the case in the old ones,
leading to the latency tracer deadlocking in gst_object_get_parent().

The dependency on the pad lock for those calls was accidental. This
patch removes it by temporarily unlocking during the affected calls,
not unlike how it's done when calling a probe callback or the
send_event() function of the downstream element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8925>
2025-06-19 09:12:14 +00:00
Jakub Adam
ddd6a708cb dashdemux2: Fix seeking in a stream with gaps
When there are gaps between segments in the DASH manifest (e.g. it's a
recording of a live stream during which the camera was turned on and off
a couple times), seeking to a timestamp that belongs into a gap leads to
repeat_index calculation yielding a nonsensical negative number (because
ts < segment->start).

In such event set the playback to continue at the first repetition of
the segment that follows after the gap.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8620>
2025-06-19 07:26:49 +00:00
Nicolas Dufresne
491b72aca3 v4l2: transform: Fix pool leak on error
Also remove un-needed nul checks.

Suggested-by: Elham nikooie
Fixes: #3097
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9221>
2025-06-19 05:21:05 +00:00
Nicolas Dufresne
3c06444a90 v4l2: encoder: Fix possible internal pool leak
Also remove the unneeded null checks that have spread around.

Suggested-by: Elham nikooie
Fixes: #3097
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9221>
2025-06-19 05:21:05 +00:00
F. Duncanh
5268156447 glwindow_cocoa: fix window not closing (w/o user window handle)
A user-supplied window handle (external_view) becomes the superView
of internal_view, which is closed with [view removeFromSuperview].
This fails silently if external_view = NULL (no handle supplied).
Call [win_internal_id close] in this case. Fixes #4432.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9049>
2025-06-19 03:34:09 +00:00
Ben Butterworth
224da2b947 mpegts: handle MPEG2-TS with KLV metadata safely by preventing out of bounds
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3896

@slomo, as requested on https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3896#note_2780065

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8529>
2025-06-19 00:41:09 +00:00
Théo Maillart
b13fd1db7b urisourcebin: never manually store stream-start
The copy of the exact same stream-start event prevents the multiqueue's sink
event function from being called because it is already stored on both pads at
link time
The text streams are no longer considered sparse by the multiqueue, so
interleave calculation is broken and makes us consume a lot of ram and we can
end up killed by the kernel because of this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8412>
2025-06-18 12:43:18 +00:00
Johan Sternerup
c530453413 twcc: Fix reference timestamp wrapping (again)
With
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7527
an attempt was made to fix the wrapping of the TWCC 24-bit reference
time. Unfortunately this fix was not correct due to a late change and
the lack of unit tests to catch it. This time unit tests are provided to
make sure we have a correct fix for all the edge cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9051>
2025-06-18 10:43:34 +00:00
Víctor Manuel Jáquez Leal
76f52e5f98 vkupload: use gst_buffer_find_memory() to select memory
We never implemented correctly the selection of memories in a buffer given the
plane.

This patch uses gst_buffer_find_memory() for that. The offset is checked via the
video meta either in the input and output buffers, or the default offset given
the format and size.

This patch also requests the video meta option for the output buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9219>
2025-06-18 09:06:55 +00:00
Víctor Manuel Jáquez Leal
44acc0bfb1 vkimagebufferpool: set video meta to buffers if requested
This patch adds the possibility to attach video metas to allocated buffers if
API users request that option.

The main reason to add this meta is for the future usage of
gst_buffer_find_memory(), where the requested offset determines the memory
index.

In the case of multi-memory Vulkan images the offset of every component is
larger than the default offset determined by the format and frame size, because
of the buffer minimum size and memory alignment determined by the used driver.
Then, the offset is set in the buffer video meta.

In the case of single memory Vulkan images, the default offset is set in the
video meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9219>
2025-06-18 09:06:55 +00:00
Víctor Manuel Jáquez Leal
bbd8fbb023 vkimagebufferpool: remove unused variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9219>
2025-06-18 09:06:55 +00:00
Matthew Waters
f51d9fc128 rtph265depay: output profile, tier, level in output caps
These values are very easy to provide and some cases in rtph265pay require
these values to be set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9223>
2025-06-18 07:35:52 +00:00
Sebastian Dröge
b003b2b023 wavparse: Don't error out always when parsing acid chunks
Remove stray goto introduced in ba8fd35e72b645c5048813d1bcc58271fb72ab6c

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9230>
2025-06-18 05:51:31 +00:00
Matthew Waters
7bbff29763 rtph265depay: CRA_NUT can also start an (open) GOP
https://datatracker.ietf.org/doc/html/rfc7798#section-3.1.1 says that a CRA_NUT
can start a GOP so add that to the list of nal types where VPS/SPS/PPS can be
inserted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9217>
2025-06-18 01:29:10 +00:00
Matthew Waters
d59cc622f2 webrtcbin: disconnect signal ICE handlers on dispose
It is entirely possible that the in progress may still provide some state
updates until the ICE object is destroyed, these state updates should
not really be done when webrtcbin is in the process of destroying itself
and access freed data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9216>
2025-06-18 00:41:38 +00:00
Stéphane Cerveau
e82b80a74a vkerror: add invalid_video_std_parameters message
Add string to handle error related to the
codec standard parameters.

<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9212>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9212>
2025-06-17 23:44:18 +00:00
Seungha Yang
26227042c3 examples: d3d12swapchainsink: Add uv-remap/redraw example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9209>
2025-06-17 22:18:32 +00:00
Seungha Yang
c5fd61c908 d3d12swapchainsink: Add uv-remap and redraw action signal
New uv-remap signal can be used for UV coordinate remap operation
in videosink, and redraw signal can allow updating view even in paused
state

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9209>
2025-06-17 22:18:32 +00:00
Seungha Yang
ad6ce32a74 d3d12converter: Add support multiple UV remap in a single path
Add private methods for multiple UV remap operation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9209>
2025-06-17 22:18:32 +00:00
Stéphane Cerveau
59eaf4cc39 parser: fix spelling of GstAV1SegmentationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8795>
2025-06-17 21:07:13 +00:00
Arnout Engelen
b3099f7877 devtools: dots-viewer: sort static files
The fact that static-files followed the (nondeterministic) file system
order is likely what caused the dots-viewer executable not to be binary
reproducible. Enabling this feature that was added upstream should fix
it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9208>
2025-06-17 18:51:54 +00:00
Xavier Claessens
961e7753b9 wraps: Add svtjpegxs from wrapdb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9214>
2025-06-17 17:57:23 +00:00
L. E. Segovia
230fe47b59 curl: Recover missing comment
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8974#note_2955585

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9213>
2025-06-17 17:11:03 +00:00
Philippe Normand
189d33015d webrtcbin: Include all accepted media formats in SDP answers
Until this patch only the first format was added.

Fixes #4458

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9117>
2025-06-17 14:53:32 +00:00
Philippe Normand
fb43941e92 sdp: Add media_add_media_from_structure API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9117>
2025-06-17 14:53:32 +00:00
Robert Mader
d2cd810b07 formats: Add DRM equivalents for 10/12/16 bit SW-decoders formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8965>
2025-06-17 13:54:57 +00:00