diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2020-07-26 15:37:13 -0700 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-07-27 18:53:09 -0400 |
| commit | 8bb03e8f91a8e36f498250b3d1a5de082a61d5af (patch) | |
| tree | 4eb5b984ecf4e8a4526c1aaf9fe5421fb5be4704 /MediaBrowser.Controller | |
| parent | 3e742e99a5951bb75c77f65f6f095affcb705982 (diff) | |
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>
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 04d03080b..16179b777 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -456,6 +456,7 @@ namespace MediaBrowser.Controller.MediaEncoding var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1; var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); + var isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 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 ") |
