mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
Merge pull request #3711 from yrjyrj123/fix_hw_decoder_for_macos
Fix the problem that hardware decoding cannot be used on macOS. (cherry picked from commit ea0489a98e138b83277da36b6b1ff7f095285e05) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
3e742e99a5
commit
8bb03e8f91
@ -456,6 +456,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1;
|
var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1;
|
||||||
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||||
|
var isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
|
||||||
|
|
||||||
if (!IsCopyCodec(outputVideoCodec))
|
if (!IsCopyCodec(outputVideoCodec))
|
||||||
{
|
{
|
||||||
@ -511,6 +512,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state.IsVideoRequest
|
||||||
|
&& string.Equals(encodingOptions.HardwareAccelerationType, "videotoolbox", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
arg.Append("-hwaccel videotoolbox ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arg.Append("-i ")
|
arg.Append("-i ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user