Commit graph

120167 commits

Author SHA1 Message Date
Guillaume Desmottes
6e7300d2a8 qroverlay: add some debug logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7230>
2024-07-25 06:55:29 +00:00
Shengqi Yu
df28aceb49 videoscale: correct classification error
videoscale does not have convert function, so remove the convert
description in it's classification. Otherwise, if we want use
autovideoconvert to convert colorsapce, autovideoconvert will select
videoscale to do convert and this will cause to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7215>
2024-07-25 05:42:25 +00:00
Tim-Philipp Müller
0f537919a2 wraps: libgudev: add fallback uri
Release tarball is .xz but we currently use a snapshot
from gitlab, so just mirror the .bz2 instead of changing
all URLs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7221>
2024-07-24 11:44:28 +00:00
tomaszmi
07d601bbbc avtp: Fixed Linux/Alpine 3.20 build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7226>
2024-07-24 12:07:09 +02:00
Seungha Yang
0b285fc1a1 cuda: Fix runtime compiler loading with old CUDA tookit
Fallback to PTX if CUBIN symbol is unavailable

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3685
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7220>
2024-07-23 19:53:09 +00:00
Ruben Gonzalez
3e4c8f1b16 avmux: Fix crash when muxer doesn't get codecid
gst_ffmpeg_formatid_get_codecids from gst_ffmpegmux_base_init to gst_ffmpegmux_base_init

FFmpeg 7.0 included new muxer rcwt for Raw Captions with Time
(RCWT). Commit [1].  GStreamer couldn't get sink caps for muxer it.

Calling gst_ffmpeg_formatid_get_codecids in gst_ffmpegmux_register to
avoid create muxer without pad templates.

[1] https://github.com/FFmpeg/FFmpeg/commit/3525544e48

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7168>
2024-07-23 18:42:22 +00:00
Loïc Yhuel
13034cc63f meson: fix SIZEOF_OFF_T when cross-compiling with Meson >= 1.3.0
https://mesonbuild.com/Release-notes-for-1-3-0.html#clarify-of-implicitlyincluded-headers-in-clike-compiler-checks

With only stddef.h, off_t is not defined, so when cross-compiling SIZEOF_OFF_T is -1.
We now use sys/types.h which should define off_t.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7217>
2024-07-23 15:32:22 +02:00
Sebastian Gross
c35302a071 asfdemux: Be more lenient towards malformed header
VLC counts METADATA as 1 even if the specification states you must not.
This leads to asfdemux failing since there are no bytes left when asfdemux
tries to extract the "last" header.

Do not fail hard in this case and try to proceed when everything else went
fine.
So at least gst-discoverer will see what's in the file.

Closes #3684

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7209>
2024-07-23 06:35:11 +00:00
Víctor Manuel Jáquez Leal
2387c3c4aa vkimagebufferpool: no aliased images for video decoding
This fix regression in validation layer introduced by commit 3a2e8d2d19

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7211>
2024-07-22 16:46:53 +00:00
Víctor Manuel Jáquez Leal
423f0d5384 vkdecoder: handle barrier internally for coincide references
This is to avoid a regression in validation layer (introduced by commit
916c4e70cd) when using vulkandownload

VUID-VkImageMemoryBarrier2-srcAccessMask-03914 ..  vkCmdPipelineBarrier2():
pDependencyInfo->pImageMemoryBarriers[1].srcAccessMask (VK_ACCESS_TRANSFER_READ_BIT)
is not supported by stage mask (VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR)

since vulkandownload set DPB memories' access mask to
VK_ACCESS_TRANSFER_READ_BIT, while they are retain by the DPB queue, so when
they are used as DPB after been shown, this validation error is raised.

Must of the barrier values are set ignoring the previous state of the vulkan
images.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7211>
2024-07-22 16:46:53 +00:00
Stéphane Cerveau
9736b9e7b7 vulkan{up,down}load: check for a graphics family queue
Vulkan queue retrieved from peer elements should be a graphics family one.
Otherwise, get a compatible queue from the given device.

Co-Authored-By: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7162>
2024-07-22 15:18:35 +00:00
Seungha Yang
800961cf28 d3d12decoder: Add support for d3d11 output again
Although d3d12download supports d3d12 to d3d11 texture copy,
this feature might be useful if an application is not ready to d3d12
support and it expects output type of decodebin(3) is d3d11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7208>
2024-07-22 23:17:25 +09:00
Seungha Yang
8c2bbd8760 meson: d3d12: Use configuration file
Move defines to config header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7208>
2024-07-22 23:02:48 +09:00
Mengkejiergeli Ba
84cb1ef895 msdk: Add new driver name "xe"
Intel has released a new graphic driver named "xe" for
newer Gen12/Xe graphics (i.e. from Lunar Lake).
This patch add "xe" name when getting device in gst-msdk plugins.
See xe driver public in
https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7178>
2024-07-22 12:51:47 +00:00
Víctor Manuel Jáquez Leal
035e0698cf vkoperation: fix documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7203>
2024-07-22 10:49:33 +02:00
Nirbheek Chauhan
2ee51bf6f6 glvideomixer: Fix critical when setting start-time-selection
It caused a critical, but did not affect functionality because the
GValue was passed as-is to the glvideomixerelement which actually does
something with the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7204>
2024-07-20 01:05:58 +00:00
L. E. Segovia
35271a2ef3 isac: Work around upstream having no shared library support for MSVC
None of the symbols in webrtc-audio-coding-1 are marked with
`__declspec(dllexport)`, rendering the library usable only if
it was built with GCC/Clang.

The only fix available (as the pulseaudio copy has not been updated
with Google's upstream) is to ensure the fallback builds statically.
Although this change will also affect webrtcdsp's dependency on
webrtc-audio-processing-1, it does not break its compilation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407>
2024-07-19 18:51:03 -03:00
Nirbheek Chauhan
6ce72488fa Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7191>
2024-07-19 14:46:36 +00:00
Víctor Manuel Jáquez Leal
e91ffae1f0 vkimagebufferpool: reset buffer's access flags
The access flags are kept around the operations, but when the buffer is
released, the access flag should be reset to its original value, since queue
transfers can be done along the pipeline and, when reusing the buffer, the new
queue might not support the latest access flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
cdf07cd912 vulkanh264dec: set access NONE at buffer pool allocation parameters
Since the decoding queue might not have transfer capabilities.

This change also applies to unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
2990cc5f71 vulkan: add source pipeline stage to _operation_add_frame_barrier()
Instead of dragging the last destination pipeline stage as current barrier
source pipeline stage (which isn't a valid semantic) this patch adds a parameter
to gst_vulkan_operation_add_frame_barrier() to set the source pipeline stage to
define the barrier.

The previous logic brought problems particularly with queue transfers, when the
new queue doesn't support the stage set during a previous operation in a
different queue.

Now the operation API is closer to Vulkan semantics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
dd4027388e vulkan: fix wrong stages or access in barriers
While working on !7165 we found out that some parameters for barriers were wrong
or the destination pipeline stage was too coarse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7200>
2024-07-19 12:44:51 +02:00
Matthew Waters
58db0e6ed8 decklinkvideosink: schedule frames before they need to be displayed
This removes most occurances of 'late' frame notifications produced by
decklink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7107>
2024-07-19 01:28:16 +00:00
Seungha Yang
9a06330d09 d3d12converter: Update internal method names
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7193>
2024-07-18 14:17:43 +00:00
Seungha Yang
72895ed0fa d3d12: Always allocate output texture using shared heap
... if downstream preference is unknown (e.g., no proposed
buffer pool by downstream), so that produced textures can be
shareable with other APIs such as d3d11 or vulkan, or other processes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7193>
2024-07-18 14:17:43 +00:00
Jakub Adam
9629d78b7c gstvideoaggregator: preserve features in non-alpha caps
Fixes caps negotiation when sink template caps of an element inheriting
GstVideoAggregator have features different from the implicit
"memory:SystemMemory".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7102>
2024-07-18 14:17:45 +02:00
Robert Mader
f392e9b369 vabase: Stop aligning VideoInfo during DMABUF import
Doing so resets the stride from the VideoMeta and it wasn't done before
the commit below. While on it, drop the plane size check as we can't
reliably predict the correct size when using DRM modifiers.

Fixes: 89b0a6fa23 ("va: refactor buffer import")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7187>
2024-07-18 09:10:23 +00:00
Robert Mader
b30a83ed5a vabase: Use correct VideoInfo during DMABUF import
The changes to the VideoInfo, notably the stride from the VideoMeta,
were lost. Avoid such mistakes by explicitly using the VideoInfo from
drm_info.

Fixes: 9f5b2c4e25 ("va: use GstVideoInfoDmaDrm when importing buffers")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7187>
2024-07-18 09:10:23 +00:00
Nirbheek Chauhan
08064af054 macos: Native file updates
We ship a vpx wrap now, and we need to explicitly pass options to
glib-networking and libnice.

Also, ensure that we're building the right GL API/winsys/platform.
This sets a default to protect us from stray Homebrew installations
with XQuartz.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7192>
2024-07-18 07:20:06 +00:00
Nirbheek Chauhan
65ff618bb6 avfdeviceprovider: Fix debug category initialization
The device monitor calls into avfvideosrc functions without
initializing the debug category, which causes multiple criticals.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7192>
2024-07-18 07:20:06 +00:00
L. E. Segovia
5929829131 gst: clock: Move Android OS check to the __ANDROID__ macro
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6510>
2024-07-17 22:33:52 +00:00
Sebastian Dröge
8f8fc314db examples: webrtc: rust: Update to gstreamer-rs 0.23
And also update other dependencies.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7189>
2024-07-17 09:12:47 +00:00
Seungha Yang
b37bfc02f5 d3d12: Remove unnecessary event handles
null event NT handle to ID3D12Fence::SetEventOnCompletion()
will block the calling CPU thread already, thus it has no point that
creating an event NT handle in order to immediate wait for fence at CPU-side.
Note that passing a valid event NT handle to the fence API might be useful
when we need to wait for the fence value later (or timeout is required),
or want to wait for multiple fences at once via WaitForMultipleObjects().
But it's not a considered use case for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7176>
2024-07-16 19:17:15 +00:00
Seungha Yang
783e1ea327 d3d12videosink: Fix mouse event handling
GstD3D12Window.priv.input_info is referenced by mouse event handler
in order to calculate corresponding original position
if scene is rotated/flipped by the videosink.
Fixing regression introduced by recent d3d12videosink refactoring

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7177>
2024-07-16 17:02:24 +00:00
Robert Mader
556e47580a va: Blocklist i965 driver for encoding
The driver - AKA intel-vaapi-driver - has been unmaintained for four years
now and encoding appears to be broken in various cases. As it's unlikely
that the situation will improve, blocklist the driver for encoding.
Decoding appears to be stable enough to keep it enabled.

The driver can still be used by setting the `GST_VA_ALL_DRIVERS` env
variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7170>
2024-07-16 15:53:37 +00:00
Víctor Manuel Jáquez Leal
c7259f3a5b vulkan: remove beta extensions guard for encode operations
This is not needed anymore since encoder operations are not beta anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7179>
2024-07-16 15:08:39 +00:00
Seungha Yang
dbc8a1397d d3d12compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7181>
2024-07-16 14:18:12 +00:00
Seungha Yang
3922ae5d92 d3d11compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7181>
2024-07-16 14:18:12 +00:00
Seungha Yang
75d8dbc556 avauddec: Fix crash on stop()
GstFFMpegAudDec.context can be nullptr if decoder got closed
without opening new context. Note that we don't need to clear
AVCodecContext.extradata there since avcodec_free_context()
will do clear the data if needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7180>
2024-07-16 20:49:13 +09:00
Sebastian Dröge
3eec4703c6 ajasrc: Fix handling of timestamps and don't rely on driver frame counters
The driver frame counters (processed, dropped, buffer level) are not
always correct apparently, and don't allow reliably assigning a frame
number to captured frames.

Instead of relying on them, count the number of frames directly here and
detect dropped frames based on the capture times of the frames: if more
than 1.75 frame durations are between two frames, then there must've
been a dropped frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7163>
2024-07-16 09:59:36 +00:00
Seungha Yang
89096dde38 h264decoder: Update output frame duration when second field frame is discarded
In case of an interlaced stream, if each field picture belongs to
different GstVideoCodecFrame, updates output frame's duration
based on discarded second field picture's timestamp information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7132>
2024-07-15 16:36:50 +00:00
Seungha Yang
2a6967a8cd d3d12videosink: Clear cached buffer on format change
Otherwise converter will try to read memory of which layout/format
might be different from configured converter pipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7167>
2024-07-15 10:20:46 +00:00
Víctor Manuel Jáquez Leal
058ae85b22 vadisplay: fix minor version check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7164>
2024-07-12 14:34:31 +00:00
Víctor Manuel Jáquez Leal
3a2e8d2d19 vkimagebufferpool: set image creation flags in needed
set ALIAS bit if the usage is for both sampled and storage.

set MUTABLE_FORMAT and EXTENDED_USAGE bits if the image is a multiplane YUV and
uses multiple memories.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 20:28:04 +02:00
Víctor Manuel Jáquez Leal
0f8f2d0057 vkformat: add gst_vulkan_format_get_map function
This will be used later to compare the format selected by
gst_vulkan_format_from_video_info_2(), to verify if it's multiple memory buffer
or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 20:28:04 +02:00
Víctor Manuel Jáquez Leal
17f3a22130 vulkanupload: request storage usage for bufferpool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
2d17bba6f1 vkimagebufferpool: define a default usage
Define a default usage and use it instead of repeating the same bitwise
addition.

Therefore, when usage is defined as zero, the usage is defined with the
format's supported usage and the default usage, now without the storage
bit, but with color and input attachment bits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
b1eebec485 vkformat: unward G8_B8R8_2PLANE_420_UNORM
Since it exists since VK_VERSION_1_1. It should be ignored by usage flags or the
no_multiplane parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Robert Mader
abf3361de3 waylandsink: Fix surface cropping for rotated streams
The wp_viewport source rectangle is applied in surface-local coordinates
after buffer_transform and buffer_scale. Therefore we need to swap width
and height for 90/270 deg. rotations.

This fixes playback of rotated videos such as portrait videos from
mobile devices.

See also: https://wayland.app/protocols/viewporter#wp_viewport

Fixes: 0b648f9a2d ("waylandsink: Crop surfaces to their display width height")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7136>
2024-07-10 17:13:54 +00:00
Sebastian Dröge
a786c85c4f taginject: Modify existing tag events of the selected scope
Not doing so would mean that tags would be overidden by any tag events sent by
upstream. Also only send a tag event directly if upstream never sent one.

By default use GST_TAG_MERGE_REPLACE to override tags that exist in both the
upstream event and this element with the ones from this element, but provide a
new "merge-mode" property to adjust the behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7145>
2024-07-10 13:00:34 +00:00