Add ability to specify gpu index on windows

This commit is contained in:
Evan Jarrett 2024-08-16 14:48:50 -07:00
parent 8941c059f6
commit e1f72b1f27

View File

@ -902,6 +902,12 @@ namespace MediaBrowser.Controller.MediaEncoding
if (OperatingSystem.IsWindows())
{
// on Windows, the deviceIndex is an int
if (int.TryParse(renderNodePath, NumberStyles.Any, CultureInfo.InvariantCulture, out int deviceIndex))
{
return GetD3d11vaDeviceArgs(deviceIndex, string.Empty, D3d11vaAlias) + arg + "@" + D3d11vaAlias;
}
// derive qsv from d3d11va device
return GetD3d11vaDeviceArgs(0, "0x8086", D3d11vaAlias) + arg + "@" + D3d11vaAlias;
}