122557 Commits

Author SHA1 Message Date
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
Robert Mader
c10aa337b2 video: Update drm_fourcc.h
To drm-misc-next at commit e252e3f3488a492, in order to include
new FOURCCs for SW-decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8965>
2025-06-17 13:54:57 +00:00
Matthew Waters
9f4f426a89 rtph265depay: fix codec_data generation
When producing the profile_teir_level() struct, account for emulation
prevention bytes (0x0, 0x0, 0x3) in the source SPS.  Also copy from the correct
starting point in the source SPS and don't put the NAL header into codec_data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9205>
2025-06-17 11:40:23 +00:00
Matthew Waters
01d41b5d59 decklinkvideosink: show preroll frame correctly
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4254

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9199>
2025-06-17 10:50:54 +00:00
Robert Mader
aee3fae721 wayland: Add support for local protocols
This proved to be helpful for previous protocol experiments, so let's
upstream it. Inspired by the corresponding code in Weston.

Protocols need to be placed in a `protocols` subdirectory and can be
declared in the following way in `meson.build`:
```
['color-management-v1', 'internal' ],
```

Note the `v1` being part of the name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9186>
2025-06-17 09:59:10 +00:00
César Alejandro Torrealba Vázquez
49e53cb09e qtmux: Update chunk offsets when converting stco to co64 with faststart
When creating a faststart file, qtmux has to take into account that
any 32 bit stco atom may need to be converted into its 64 bit version
due to the offset that is added before the mdat data by the moov atom,
the extra atoms and the mdat header. If a stco atom is converted into
co64, the chunk offset of all stco and co64 atoms has to be increased,
which in turn may also cause that other stco atoms need to be converted
into co64, modifying the chunk offsets again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9102>
2025-06-17 07:02:47 +00:00
Robert Mader
abe186e466 wayland: Add basic colorimetrie support
Using the Wayland color-management and color-representation protocols.

The implementation queries supported values from the compositors and tries
to convert them into GstVideoColorimetry values. It currently *does not*
pass these upstream to decoders etc. as GstCaps for negotiation.

On the Wayland side it uses named transfer functions, named primaries,
matrices and ranges. The straight alpha mode is also set if supported
by the compositor.

On setting caps it translates the GstVideoColorimetry from the GstVideoInfo
back to into a Wayland parametric image description and color representation
for the video surface if possible. If a colorimetry is not fully
support, we bail out and if wayland objects already exist they get reset or
deleted.

Note that not all GstVideoColorimetry values are implemented yet.

Useful debug options: GST_DEBUG=wlwindow:4,wldisplay:4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6830>
2025-06-17 05:41:40 +00:00
Robert Mader
bd70a242ec wayland: wlwindow: Use GstWlWindow debug category
As probably intended - and Demote frame_redraw_cb log to debug
to make it less noisy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6830>
2025-06-17 05:41:40 +00:00
Robert Mader
61f03a0ec1 wayland: Turn wl objects into GstObjects
For better logging and locking support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6830>
2025-06-17 05:41:40 +00:00
Robert Mader
0ed3a83ee7 wayland: Add color protocols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6830>
2025-06-17 05:41:40 +00:00
Sebastian Dröge
48cfd3a6e4 aacparse: Add test for correctly parsing the number of channels from codec_data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9074>
2025-06-17 04:12:15 +00:00
changyong.ahn
163e9e8df4 aacparse: Fix counting audio channels in program_config_element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9074>
2025-06-17 04:12:15 +00:00
changyong.ahn
300ff38178 gstaacparse: Fix counting audio channels in program_config_element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9074>
2025-06-17 04:12:15 +00:00