Commit graph

1761 commits

Author SHA1 Message Date
Nicolas Dufresne
bd40057130 v4l2codecs: Fix caps string leak in v4l2codecs
Unlike gst_video_format_to_string(), gst_video_dma_drm_fourcc_to_string()
return a freshly allocated string which needs to be free.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
61d2231c58 v4l2codecs: decoder: Fixed unset dimension in caps
When the driver does not implement ENUM_FRMESIZE for some specific
formats, the caps limiting the sizes may endup empty, which results in
assuming the driver can scale to any sizes.

Ensure that the original size is in the caps to prevent this assumption.
This happens with Hantro drive, since it only reply to that call if the
format is postprocessed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Benjamin Gaignard
1a9841582d v4l2codecs: Use drm modifier to build caps
Do not only use drm fourcc to build drm-format but also
include the format modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Matthew Waters
a566dfd339 uvcgadget: silence a maybe-uninitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Jakub Adam
34a400cc0e kmsbufferpool: Accept DMA_DRM caps in the config
Only linear modifier is supported due to the dumb allocator's
limitation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Jakub Adam
9e81a6517b kmssink: ensure we have a valid vinfo_drm after set_caps
Consequently drop the check in import_dmabuf

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Jakub Adam
d04a03d176 kmssink: enumerate drm formats when IN_FORMATS not present
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
6ad6b765ab kmssink: Do not provide DMA buffer pool for non-linear caps
The dumb allocator does not support modifiers, so we can not allocate
non-linear buffers by ourself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
e4d7ac5989 kmssink: Handle the DMA buffer importing correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
a925630d87 kmssink: Add DMA kind caps into sink caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
6f78e1c3e0 kmssink: Add helper functions to create DMA and raw caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
3f510d1296 kmssink: Add a helper function to collect formats and modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
9df377efc1 kmssink: Add modifier to gst_kms_allocator_dmabuf_import
Use the new drmModeAddFB2WithModifiers() API for binding the
non-linear BO.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Benjamin Gaignard
da02191411 v4l2codecs: Test ioctl return value and errno
Fix error testing when using V4L2_FMTDESC_FLAG_ENUM_ALL by using
both errno and the return value.

Fixes !7686 (merged)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7873>
2024-11-15 23:22:30 +00:00
Stéphane Cerveau
0dd706a420 vkutils: add gst_vulkan_ensure_element_device
In order to keep the same device across
the elements in the pipeline, use either the device id
to create the device or get the device from the context
set by the peer elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7843>
2024-11-15 20:32:24 +00:00
Thibault Saunier
650ff6c5d0 nvcodec: gl now supports Y444_16LE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7858>
2024-11-12 11:31:37 -03:00
Seungha Yang
43fc9525ca d3d12swapchainsink: Fix error when the sink is reused
Release backbuffer just before releasing swapchain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7867>
2024-11-12 12:03:18 +00:00
Seungha Yang
80831f77f3 d3d12swapchainsink: Add support for GstColorBalance interface
... and adding hue, saturation, brightness, and contrast properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7817>
2024-11-03 21:33:37 +00:00
Seungha Yang
c051070121 d3d12convert: Add support for GstColorBalance interface
... and adding hue, saturation, brightness, and contrast properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7817>
2024-11-03 21:33:37 +00:00
Seungha Yang
dc414415a5 d3d12videosink: Add support for GstColorBalance interface
... and adding hue, saturation, brightness, and contrast properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7817>
2024-11-03 21:33:37 +00:00
Seungha Yang
d33f5a1de9 d3d12videosink: Add support for mouse scroll events
Handle WM_MOUSEHWHEEL and WM_MOUSEWHEEL events

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7774>
2024-10-31 15:57:43 +00:00
Jan Schmidt
70f628c117 androidmedia: Add more pixel format mappings
Add missing pixel format constants, and mappings for
P010, packed variants of 420 and RGBA layouts to GStreamer
buffer formats. This fixes problems with android decoders
refusing to output raw video frames with decoders that
announce support for these common pixel formats and
only allowing the 'hardware surfaces output' path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7743>
2024-10-30 14:05:24 +00:00
Jan Schmidt
13c3d397a2 androidmedia: Add extra H.26[45] profile mappings
Update the android headers and add missing mappings for H.264/H.265
profiles that have been added in newer android releases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7743>
2024-10-30 14:05:24 +00:00
Matthew Waters
9046e60aa7 decklink: reinstate some hardcoded colorimetry handling
Needed when we don't yet have an open device and are doing negotiation.

colorimetry=bt601 is only actually supported by decklink for PAL and NTSC
formats. All other formats use bt709 or above.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
2024-10-30 03:47:14 +00:00
Matthew Waters
2832aab78a decklink: only expose HDR colorimetry if 2020 colorspace is supported
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
2024-10-30 03:47:13 +00:00
Matthew Waters
19a60f341c decklinkvideosrc: ignore HDR metadata consisting of all zeros
In some cases decklinkvideosink may produce such stream when the
information is unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
2024-10-30 03:47:13 +00:00
Matthew Waters
06c344d43a decklinkvideosink: provide default values when HDR metadata is not available
Some file format standards don't require mastering-display-info
and content-light-level values to be provided.

Decklink however requires the static HDR metdata for the PQ transfer
function which we may not have.

CTA-861-G mentions that in this case, 0 may provided as an 'unknown'
value which is what we use here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
2024-10-30 03:47:13 +00:00
Matthew Waters
a509a1fd40 decklinkvideosink: fix incorrect EOTF value
Checking for mastering-display-info twice is incorrect.  One of the
checks should be for the content-light-level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
2024-10-30 03:47:13 +00:00
Víctor Manuel Jáquez Leal
899792a5ef va{av1,vp9}enc: fix return value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7773>
2024-10-29 15:29:51 +00:00
Pablo García
6bbddc683d d3d11: implement mouse wheel events
Adittion of d3d11 support for WM_MOUSEWHEEL and WM_MOUSEHWHEEL events,
which are triggered when the mouse is scrolled vertically or horizontally
respectively.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7705>
2024-10-28 22:23:41 +00:00
Edward Hervey
36e999b5f5 vacompositor: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7455>
2024-10-25 13:55:20 +00:00
Jordan Petridis
14c1bedb45 gstvafilter: Add back missing property comments
In b1cda4439b the property comments
were removed, even though these are marked as public api.

Add back the comments, and a Since version for interpolation-method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7455>
2024-10-25 13:55:18 +00:00
Andoni Morales Alastruey
e8ab9349f5 vtdec: add support for level 6 6.1 and 6.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7729>
2024-10-24 21:45:32 +00:00
Seungha Yang
8c3d516a14 d3d12: Additional fixes for MinGW build
Various fixes for GCC build, including actual bug fixes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7722>
2024-10-24 06:54:30 +09:00
Seungha Yang
703cc1783e d3d12: Fix MinGW build with installed DirectX-Headers
Required for cerbero MinGW build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7154>
2024-10-22 21:25:11 +00:00
Jochen Henneberg
f31581544c va: Added VP8 encoder
Fixes #3430
Fixes #3576

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6959>
2024-10-22 11:48:49 +00:00
Seungha Yang
fb6a5c8a0c d3d12mipmapping: Fix debug category
Fixing copying-and-pasting mistake

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7701>
2024-10-20 16:01:10 +00:00
Benjamin Gaignard
451b32574f v4l2codecs: dynamically discovers supported pixels formats
If the driver allows it, for each stateless decoder,
enumerate all the pixels formats and use this list for source
pad instead of a static template.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7686>
2024-10-19 22:14:13 +00:00
Benjamin Gaignard
3a52cbcc67 v4l2codecs: Update videodev2.h with V4L2_FMTDESC_FLAG_ENUM_ALL flag
Add V4L2_FMTDESC_FLAG_ENUM_ALL flag to support discovering all
possible pixel formats.
Add V4L2_FMT_FLAG_META_LINE_BASED to not create a hole in flag
definition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7686>
2024-10-19 22:14:13 +00:00
He Junyan
dce250beb8 vaav1enc: Do not enable palette mode by default
Palette mode should only be enabled only when we know that the content
of the picture is simple. For example, only white letters on black
screen in SCC mode. So, by default, we need to disable it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7668>
2024-10-19 12:34:40 +00:00
Benjamin Gaignard
c67e6cdec7 kmssink: Add IMX-DCSS auto-detection
Add IMX DCSS display controller into list of
auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7685>
2024-10-19 04:54:18 +00:00
Benjamin Gaignard
e13065b22a v4l2codecs: vp9: Allow inter-frames resolution change
When the stream resolution change it is needed to negotiate
a new pools and to update the caps.
Resolution change could occurs on a new sequence or a new
picture so move resolution change detection code in a common
function.
For memory allocation reasons, only allows resolution change
on non keyframe if the driver support remove buffer feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:04 +00:00
Benjamin Gaignard
34997e88ae codecs:vp9 decoder: Remove unsused info field
Video info field is never used so remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:04 +00:00
Benjamin Gaignard
ad537ef934 v4l2codecs: Add remove buffers helpers
Add helpers function to call VIDIOC_REMOVE_BUFS ioctl.
If the driver support this feature buffers are removed from the queue when:
- the pool when is detached from the decoded.
- the pool is released.
- allocation failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:04 +00:00
Benjamin Gaignard
fecdfe18ca v4l2codecs: Do not register stateless decoder if the driver doesn't support VIDIOC_CREATE_BUFS
If the driver can't allocate buffers with VIDIOC_CREATE_BUFS do not
register it has stateless decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:04 +00:00
Benjamin Gaignard
2753a8f0c1 v4l2codecs: Replace VIDIOC_REQBUFS calls by VIDIOC_CREATE_BUFS
Use VIDIOC_CREATE_BUFS ioctl to create buffers instead of VIDIOC_REQBUFS
because it allows to create buffers also while streaming.
To prepare the introduction of VIDIOC_REMOVE_BUFFERS create
the buffers one per one instead of a range of them. This way
it can, in the futur, fill the holes.
gst_v4l2_decoder_request_buffers() is stil used to remove all
the buffers of the queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:04 +00:00
Benjamin Gaignard
c25c4355b1 v4l2codecs: udpate videodev2.h
Update videodev2.h to be aligned with kernel version v6.10

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7684>
2024-10-19 01:39:03 +00:00
L. E. Segovia
4dcc4b6235 meson: Undefine any WINVER and _WIN32_WINNT entries before redefining them
Fixes Cerbero build with MinGW GCC 14, where specifying -DWINVER=0x0601 -DWINVER=0x0A00 is a hard -Werror.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:10:46 -03:00
L. E. Segovia
572f2d10f5 meson: amfcodec: fix build with MinGW GCC 14
>  ../sys/amfcodec/include/core/PropertyStorage.h:87:50: error: 'virtual void
>   amf::AMFPropertyStorage::RemoveObserver(amf::AMFPropertyStorageObserver*)' was hidden [-Werror=overloaded-virtual=]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:05:23 -03:00
L. E. Segovia
4af2121189 meson: d3d12: fix build with MinGW GCC 14
Also apply the d3d11 fix since both use the same header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:01:46 -03:00