4599 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Jan Schmidt
ffba5837ac tsdemux: Send new-segment before GAP
If adding a sparse stream and sending a gap event to bring it
up to speed, make sure to send the new segment event first

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8143>
2025-06-17 03:01:39 +00:00
Víctor Manuel Jáquez Leal
74b741e535 test: vulkanupload unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9218>
2025-06-16 23:23:44 +00:00
Víctor Manuel Jáquez Leal
717198b38b vulkanupload: fix regression for uploading VulkanBuffer
Merge request !5651 introduced a regression for uploading VulkanBuffer. It can
be verified by

gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! vulkanupload ! \
  video/x-raw\(memory:VulkanBuffer\) ! fakesink

Nobody has complained about this regression, so we assume it's a very niche
use-case.

This patch solve the regression by instantiating a different buffer pool
depending on the output cap features, and configuring it accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9218>
2025-06-16 23:23:44 +00:00
Olivier Crête
1fa4d154d8 onnx: Also implement stop to clean up session
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9176>
2025-06-10 18:15:11 +00:00
Olivier Crête
f48ad0fde6 onnxinference: Clean up session creation logic
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9176>
2025-06-10 18:15:11 +00:00
Víctor Manuel Jáquez Leal
82a71a7739 gstreamer-vaapi: remove subproject
It's almost superseded by va plugin in gst-plugins-bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9200>
2025-06-10 17:32:46 +00:00
Philippe Normand
2a1890c03c transcoder: Fix uritranscodebin reference handling
Make sure the reference is not floating, because the get_pipeline function
returns a transfer-full reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9198>
2025-06-10 16:45:20 +00:00
L. E. Segovia
ebee431dac curl: Fix wrong format specifier for macOS
> ../ext/curl/gstcurlhttpsrc.c:1331:11: error: format specifies type
> unsigned long long' but the argument has type 'curl_off_t' (aka 'long') [-Werror,-Wformat]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8974>
2025-06-10 14:58:26 +00:00
Stefan Andersson
38f5ab75fd h26xparse: Drop NAL units that can't be parsed using AU alignment
Change so that the handling of NAL unit that can't be parsed when using
AU alignment is the same as when using NAL alignment, ie drop the data
if it can't be parsed.

If the AU contains more than one NAL unit any correctly parsed NAL unit
in the AU is kept.

Fixes #4436

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8976>
2025-06-10 13:00:20 +00:00
Stefan Andersson
a58fd15c91 h26xparse: Bail out if ...finish_frame returns an error
For NAL alignment bail out if gst_base_parse_finish_frame returns a flow
error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8976>
2025-06-10 13:00:20 +00:00
Stefan Andersson
9aa1b969cd h26xparse: Prevent assert hitting when discarding NAL unit
If using NAL aligment and only dropping part of the AU, the size
argument given to gst_base_parse_finish_frame was wrong and this assert
in gst_base_parse_finish_frame hit
'gst_adapter_available (parse->priv->adapter) >= size' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8976>
2025-06-10 13:00:20 +00:00
Daniel Morin
28fafc5488 onnx: produce tensor caps
- Add tensor description to srcpads caps

onnx: formatting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9172>
2025-06-10 09:04:48 +00:00
Daniel Morin
9bd3a3be74 gsttensor: adding new datatypes
- Adding datatype for string, boolean, complex numbers and special floating
  point numbers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9172>
2025-06-10 09:04:48 +00:00
raghu447
4b6c732fdd analytics: add a convenient API to retrieve tensor
use the API in facedetector tensor decoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9162>
2025-06-09 10:06:43 +05:30
raghu447
a5586a50c2 tfliteinference: initialize means and stddevs arrays appropriately
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9189>
2025-06-08 17:07:47 +00:00
Jakub Adam
12607d67b1 meson: fix building -bad tests with disabled soundtouch
Fixes an error from Meson:

../subprojects/gst-plugins-bad/tests/validate/meson.build:16:93: ERROR:
Unknown variable "soundtouch_dep"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9190>
2025-06-06 17:43:53 +02:00
Glyn Davies
607d24dfc6 mpegtsmux: Corrections around Teletext handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8966>
2025-06-05 13:43:23 +00:00
Julian Bouzas
841448cd94 lcevcdec: Check for errors after receiving all enhanced and base pictures
The LCEVC_ReceiveDecoderBase() and LCEVC_ReceiveDecoderPicture() APIs from the
LCEVCdec SDK can return LCEVC_Error if the enhancement data is wrong. This
change improves the lcevcdec element to check for those errors and stop the
pipeline when that happens.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9057>
2025-06-04 15:53:03 -04:00
Seungha Yang
4d2869d4a3 d3d11decoder: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
Seungha Yang
4735e765a3 d3d12decoder: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
Seungha Yang
712203163e nvdec: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.
Also parses HEVC specific interlace information

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
raghu447
251d74ca69 tensordecoder: add facedetector tensor decoding support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8600>
2025-06-03 18:48:36 -04:00
Seungha Yang
6efe987d5c d3d11compositor: Fix negative position handling
Negative positions should be cropped out

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9158>
2025-06-01 18:21:28 +00:00
Seungha Yang
aa0c257d4c d3d12compositor: Fix negative position handling
Negative positions should be cropped out

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4249
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9158>
2025-06-01 18:21:28 +00:00