0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
Norihiro Kamae
384a5e7f30 obs-qsv11: Remove unused functions 2024-08-07 17:27:49 -04:00
Kurt Kartaltepe
15ec21106a obs-qsv11: Check for null response on free
During destruction of the QSV_Encoder_Internal the response may not be
initialized and we can segfault. Add a check for this similar to the
Windows implementation.
2024-08-05 20:28:07 -04:00
Kurt Kartaltepe
68768e13ae obs-qsv11: Fix adapter detection and fallback to sysmem
Pass down texture/host memory choice for fallback encoders. During
fallback we don't (can't) initialize a shared texture pool and should
use the regular host memory path.

This fixes usage on multi-GPU systems, and enables texture encoders.
2024-04-20 17:06:46 -07:00
Kurt Kartaltepe
ebea709381 obs-qsv11: Implement texture encoder on Linux
Implements the texture allocator for QSV using VA-API surfaces and
implement encode_texture2 for using OpenGL textures directly.
2024-04-20 17:06:46 -07:00
PatTheMav
2bc4c69ee9 plugins: Fix compile errors introduced by CMake build framework 3.0 2024-04-13 23:48:38 -04:00
Kurt Kartaltepe
14f068a6b2 obs-qsv11: Use the new gs_enum_adapters 2024-01-27 17:51:33 -06:00
Ryan Foster
53dee8f990 obs-qsv11: Remove D3D9 allocator
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit and should no longer be needed.

Revert "obs-qsv11: Use d3d9 allocator on Win7"

This reverts commit b276b1633e.
2023-10-04 15:24:56 -04:00
Kurt Kartaltepe
9d4b916248 obs-qsv11: Redo session data releasing for Linux
This reverts the changes to Windows where Release() was called every
time, since we need share a single DX context across multiple encoders.

Instead introduce a ReleaseSessionData() function and some platform
specific session data that will be passed to it. We use this to track
the VA-API display and fd to release them at the right time. Leaking
displays will also lead to cache pollution in the intel-media-driver
crashing users so we cannot do that.

fixes #9611
2023-09-29 11:56:53 -04:00
Kurt Kartaltepe
543be8cf29 obs-qsv11: Ensure default devices are Intel devices 2023-09-05 15:34:37 -04:00
Kurt Kartaltepe
8e7b697447 obs-qsv11: Fixup session releasing for Linux 2023-08-26 16:40:46 -07:00
Kurt Kartaltepe
368082d6c0 obs-qsv11: Use device enumeration for choosing DRM device
Trying to use the display server as the QSV device was found to be
generally wrong in beta, so instead lets save defaults from the earlier
device enumeration similar to obs-ffmpeg-vaapi which is known to work
well.
2023-08-26 16:40:46 -07:00
Kurt Kartaltepe
fc6a15e13a obs-qsv11: Mark internal functions static 2023-08-26 16:40:46 -07:00
Kurt Kartaltepe
b6b8f5b80a obs-qsv11: Fix VPL initialization on intel-mediaSDK
VPL does not have a consistent initialization process for the various
backends it dispatches to. So this resolves the new VPL dispatcher
failing to initialize the video session when it dispatches to
intel-mediaSDK backend. On the oneVPL-intel-gpu backend VA-API sessions
are correctly initialized so this wasnt noticed when tested on newer
hardware.
2023-08-16 15:40:02 -04:00
Gale
dbbbcd8c57 obs-qsv11: Add VPL changes 2023-08-07 13:23:26 -04:00
Kurt Kartaltepe
b8ccaf5649 obs-qsv11: Add adapter checks for Linux
This moves the existing adapter checking into the platform layer and
moves the Windows implementation to its platform implementation and adds
a Linux implementation based on directly querying VA-API.

Unlike Windows, this check takes ~1ms so we have no need to spin out
another thread to perform the work. This also fixes up some of the CPP/C
mixing going on in common_utils."h" to allow us to call common functions
from C files.
2023-07-14 12:19:33 -04:00
Kurt Kartaltepe
c6b470de9a obs-qsv11: Add a Linux implementation
This adds a CMake module for finding the QSV SDK (libmfx/onevpl) and an
the required platform components to initialize QSV with the VA-API
platform.
2023-07-14 12:19:33 -04:00