Commit graph

719 commits

Author SHA1 Message Date
Seungha Yang e6f496a240 cuda: Add support for VUYA format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6417>
2024-04-02 13:07:29 +00:00
Seungha Yang dce4067e83 meson: d3d11: Add support for MinGW DirectXMath package
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3428
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6495>
2024-04-02 05:14:53 +09:00
Seungha Yang ce34e63605 d3d12memory: Add support for d3d11 texture caching
Would be useful for various D3D11 interop use cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6499>
2024-04-02 03:43:59 +09:00
Seungha Yang 7d0e90b7bc d3d12: Move core part to gst-libs
Move buffer pool, converter, and device abstraction layer to
public library

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494>
2024-04-01 10:37:50 +00:00
Seungha Yang d0cfada15e meson: d3d11: Disable library build if DirectXMath header was not found
DirectXMath header library is a hard dependency

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6468>
2024-03-28 11:44:14 +00:00
He Junyan 2688e28438 vp9bitwriter: Fix several hotdoc related format issues
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6437>
2024-03-27 10:17:45 +08:00
Seungha Yang cab1f3e547 d3d11: Port to d3dshader library
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434>
2024-03-24 22:28:14 +09:00
Seungha Yang 13c90b606a d3dshader: Add HLSL shader library
Adding a new library for HLSL compile and compiled bytecode caching.
This library will be used by d3d11 and d3d12 library/plugin, in order to
reuse single HLSL code and compiled HLSL bytecode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434>
2024-03-24 22:05:49 +09:00
Seungha Yang 93bb362016 d3d11: Update shader to be d3d12 compatible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434>
2024-03-24 20:33:26 +09:00
He Junyan 142448bbed vp9bitwriter: Add the VP9 bit writer helper functions
In this first version, we only implement the "show existing frame"
and super frame writting. Other frame header types writting can
be added when needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3293>
2024-03-20 08:53:11 +00:00
Philippe Normand 76d1bd05b2 play: Fix a critical warning in error callback
`on_error()` can be called with a NULL details structure, so in that situation
the `gst_structure_copy()` would raise a critical warning. Create an empty
structure instead of attempting to copy a NULL one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6385>
2024-03-17 11:18:37 +00:00
Seungha Yang 1d8138fd18 d3d11device: Fix adapter LUID comparison in wrapped device mode
Fix integer type mismatching

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3382
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6358>
2024-03-13 20:18:29 +00:00
Alexander Slobodeniuk 6a6a4bf1a4 d3d11device: raise 'device-removed' signal on DXGI_ERROR_DEVICE_REMOVED
When this error gets caught the GstD3D11Device object raises the new
"device-removed" signal. This allows to handle the error from outside:
stop the playback, re-create the player, replace the catched GstContext by
the new one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6193>
2024-03-13 17:25:31 +00:00
Seungha Yang c9aaf39279 cuda,d3d11,d3d12bufferpool: Disable preallocation
Do not chain up to parent's GstBufferPool::start() which will do
preallocation. We don't want it to be preallocated
since there are various cases where negotiated downstream buffer pool is
not used at all (e.g., zero-copy decoding, IPC elements).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6326>
2024-03-12 18:07:29 +00:00
Chris Spencer 1032d58187 vkmemory: invalidate non-coherent memory when mapping for read
Mapping non-coherent memory does not implicitly invalidate the host caches.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6310>
2024-03-11 01:55:44 +00:00
Chris Spencer 9412565221 vulkan/operation: use timeline semaphore fallback if sync2 not supported
gst_vulkan_operation_add_dependency_frame does not fall back to the
timeline semaphore implementation if VK_KHR_synchronization2 is compiled
in, but not supported by the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6309>
2024-03-11 00:58:40 +00:00
Chris Spencer 7701e9ffeb vulkan/operation: add missing unlock
gst_vulkan_operation_add_dependency_frame does not release its lock if
support for VK_KHR_timeline_semaphore/VK_KHR_synchronization2 is compiled
in, but not supported by the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6309>
2024-03-11 00:58:40 +00:00
Mathieu Duponchelle f1e2c7918e analytics: whitespace matters for gtk-doc syntax
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête caac280466 analytics: Add documentation to hotdoc build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête 7a14b48dad analytics: Add missing documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête 0aecef9b63 analytics: Fix various typos in the documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 09:59:12 -05:00
Seungha Yang d0713e029c d3d11memory, d3d12memory: Fix outstanding memory count tracing
Gets being released memory back to queue even if allocator is flushing
in order to count the number of outstanding memory objects.
Also, clear queue if there's no outstanding memory object and
allocator is flushing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Seungha Yang f77f3e83ed cudamemory: Fix outstanding memory count tracing
Gets being released memory back to queue even if allocator is flushing
in order to count the number of outstanding memory objects.
And fixing double count increment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Damian Hobson-Garcia dd8ef3ec1b waylandsink: Move buffer commits to the display thread
Syncrhonizing buffer commits to the streaming thread can lead to
dropped frames when frame callbacks are not processed before the
next frame is ready for rendering.  Depending on the drift between
the wayland compositor and buffer source timings, this can lead to
periods of significant frame drop, especially when the media frame
rate is close to the display frame rate.

Cache buffers in the streaming thread and peform commits on the
display thread to eliminate the buffer commit racing.

The implementation is the same for both waylandsink and gtkwaylandsink,
so move it to the common wayland library under gst-lib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia 612ee3b591 wayland: Add API to ref/unref current GstBuffer inside a GstWlBuffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia 1b3bb334eb wayland: Add synchronized requests to WlDisplay
Add synchonized versions of wl_display_sync() and wl_callback_destroy()
that will ensure that to callbacks can be managed in a thread safe way
on the display queue even when they are dispatched from a separate
thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
naglis 476a34cfdb gstplay: Fix typos in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6177>
2024-02-23 00:35:58 +00:00
ekwange 0cbb396ab9 mse: Add logging init for mediasource sample map
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6033>
2024-02-21 18:11:25 +00:00
Edward Hervey 62b9049d20 mpegst: Fix ownership of return value
This inherits from the same rule as gst_buffer_add_meta

```
gst-mpegtspesmetadatameta.h:98: Warning: GstMpegts:
gst_buffer_add_mpegts_pes_metadata_meta: return value: Invalid non-constant
return of bare structure or union; register as boxed type or (skip)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6146>
2024-02-20 11:33:33 +02:00
Edward Hervey d26194db0e libgstplay: Use playbin3 by default
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6120>
2024-02-15 09:00:45 +01:00
Seungha Yang d98c922995 h265decoder: Fix DPB size calculation
MaxDpbSize specified in A.4.2 tells upper bound of decoded picture
buffer size but does not tell actual required size.
Use max_dec_pic_buffering value as a dpb size. Some backends
such as DXVA and NVDEC might require pre-allocated DPB buffer
and unnecessary large DPB size will result in waste of GPU memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6101>
2024-02-14 15:05:59 +00:00
Víctor Manuel Jáquez Leal 2011dec249 vulkan/decoder: fix documentation generation
GstVulkanDecoderParameters is an union, not a struct, and that isn't handled by
hotdoc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6089>
2024-02-10 17:17:23 +00:00
Víctor Manuel Jáquez Leal f0c5a853a6 vulkan/decoder: don't initialize function table once
Since it has to be associated with the device and it gets destroyed when the
decoder is freed.

Now it's created when the decoder starts and it's flagged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6089>
2024-02-10 17:17:23 +00:00
Seungha Yang b3a29b61c5 dxvavp8decoder: Fix reference frame setting
Fixing typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6088>
2024-02-10 21:18:44 +09:00
Sebastian Dröge 77a09c1781 analytics: Allow getting a related meta with ANY type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6068>
2024-02-07 14:07:52 +00:00
Tim-Philipp Müller f1940077a2 codecparsers: av1bitwriter: fix Since marker
... and add them to the symbol index to make hotdoc happy
2024-02-06 16:37:13 +00:00
Tim-Philipp Müller 6651bb3ed8 codecparsers: document new GstH265Level and GstH264Level enums
... and add them to the symbol index to make hotdoc happy.
2024-02-06 16:37:13 +00:00
Tim-Philipp Müller b9b249be48 va: fix g-i annotation
This parameter annotation is unknown :[allow-null-none] None
2024-02-06 16:37:12 +00:00
sergey radionov ebc51e3253 nice: resolve result should go to nice helper thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5921>
2024-02-06 09:12:13 +00:00
Olivier Crête 351f823704 analytics: Always return a string from mtd_type_get_name()
It makes it easier to use in printf() style strings without worrying
about getting a NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6035>
2024-02-02 15:49:56 +00:00
Daniel Morin 8122f623f6 analytics: Change indexes type from i32 -> gsize
- gst_analytics_cls_mtd_get_length() return a gsize, this type dicated index
  type for gst_analytics_cls_mtd_get_quark() and
  gst_analytics_cls_mtd_get_level().
- Minor cleanup/improvement on index validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6018>
2024-01-31 15:22:43 +00:00
Daniel Morin 42227d7de3 analytics: add api on OD to retrieve bbox confidence
- Add a specific api to retrieve bbox confidence level without having to
  retrieve it's location.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6017>
2024-01-31 14:40:56 +00:00
Seungha Yang 51162acc31 cuda: Report device open error
Call gst_cuda_result() with CUDA_ERROR_NO_DEVICE error code if
we could not open device, so that application can catch the error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6006>
2024-01-30 14:30:41 +00:00
Seungha Yang cd6d62ddf0 cuda: Use cuStreamDestroy_v2 API
Sync up with CUDA 11.x/12.0 header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6006>
2024-01-30 14:30:41 +00:00
Víctor Manuel Jáquez Leal c760c72f7a vkformat: fetch correctly feature flags2
Feature flags2 are fetch through VkFormatProperties3KHR and needs more guards
checking.

Moved out all the feature flags fetching to another function for clarity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6014>
2024-01-30 12:57:41 +00:00
Víctor Manuel Jáquez Leal c24b47ecee vkformat: use VK_KHR_get_physical_device_properties2 to guard
and VK_KHR_format_feature_flags2 rather than a meaningless version handling.

Also the patch brings back the usage of features2 for video extensions, use KHR
version to support the guarded symbols.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6014>
2024-01-30 12:57:41 +00:00
Víctor Manuel Jáquez Leal 394aaa6a59 vulkan: early return if gst_buffer_pool_set_config() fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6013>
2024-01-30 11:58:04 +00:00
He Junyan 040042113e codecparsers: Implement the AV1 bit code writer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015>
2024-01-30 08:24:25 +00:00
He Junyan e1d96d0669 codecparsers: av1: add ref_global_motion_params in frame header
In order to ease the AV1 bit writer to write the global_motion_params
when primary_ref_frame is enabled, we need to add this field to set
the global_motion_params of the reference frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015>
2024-01-30 08:24:25 +00:00
He Junyan 14a5d936f8 codecparsers: av1: add expected_frame_id in frame header
We need it to ease the bit code writing of AV1 frame header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015>
2024-01-30 08:24:25 +00:00