|
|
|
@ -878,17 +878,23 @@ 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())
|
|
|
|
|
{
|
|
|
|
|
// on Windows, the deviceIndex is an int
|
|
|
|
|
if (int.TryParse(renderNodePath, NumberStyles.Integer, 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;
|
|
|
|
|
}
|
|
|
|
@ -1048,7 +1054,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
args.Append(GetQsvDeviceArgs(QsvAlias));
|
|
|
|
|
args.Append(GetQsvDeviceArgs(options.QsvDevice, QsvAlias));
|
|
|
|
|
var filterDevArgs = GetFilterHwDeviceArgs(QsvAlias);
|
|
|
|
|
// child device used by qsv.
|
|
|
|
|
if (_mediaEncoder.SupportsHwaccel("vaapi") || _mediaEncoder.SupportsHwaccel("d3d11va"))
|
|
|
|
|