From 51433528a187ef68b724b5443061263a70446149 Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Sat, 3 Aug 2024 11:56:56 -0500 Subject: [PATCH] Allow QSV to use the renderNodePath instead of defaulting to the first available device --- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 2c3d44bf8..3f3f80f0c 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -891,13 +891,13 @@ namespace MediaBrowser.Controller.MediaEncoding renderNodePath); } - private string GetQsvDeviceArgs(string alias) + private string GetQsvDeviceArgs(string renderNodePath, string alias) { var arg = " -init_hw_device qsv=" + (alias ?? QsvAlias); if (OperatingSystem.IsLinux()) { // derive qsv from vaapi device - return GetVaapiDeviceArgs(null, "iHD", "i915", null, VaapiAlias) + arg + "@" + VaapiAlias; + return GetVaapiDeviceArgs(renderNodePath, "iHD", "i915", null, VaapiAlias) + arg + "@" + VaapiAlias; } if (OperatingSystem.IsWindows()) @@ -1061,7 +1061,7 @@ namespace MediaBrowser.Controller.MediaEncoding return string.Empty; } - args.Append(GetQsvDeviceArgs(QsvAlias)); + args.Append(GetQsvDeviceArgs(options.VaapiDevice, QsvAlias)); var filterDevArgs = GetFilterHwDeviceArgs(QsvAlias); // child device used by qsv. if (_mediaEncoder.SupportsHwaccel("vaapi") || _mediaEncoder.SupportsHwaccel("d3d11va"))