mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
Gate the macOS only functions
This commit is contained in:
parent
384134fd25
commit
c69e9d8f2c
@ -3,6 +3,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.MediaEncoding.Encoder;
|
namespace MediaBrowser.MediaEncoding.Encoder;
|
||||||
@ -10,6 +11,7 @@ namespace MediaBrowser.MediaEncoding.Encoder;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper class for Apple platform specific operations.
|
/// Helper class for Apple platform specific operations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SupportedOSPlatform("macos")]
|
||||||
public static class ApplePlatformHelper
|
public static class ApplePlatformHelper
|
||||||
{
|
{
|
||||||
private static readonly string[] _av1DecodeBlacklistedCpuClass = ["M1", "M2"];
|
private static readonly string[] _av1DecodeBlacklistedCpuClass = ["M1", "M2"];
|
||||||
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
@ -437,6 +438,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SupportedOSPlatform("macos")]
|
||||||
public bool CheckIsVideoToolboxAv1DecodeAvailable()
|
public bool CheckIsVideoToolboxAv1DecodeAvailable()
|
||||||
{
|
{
|
||||||
return ApplePlatformHelper.HasAv1HardwareAccel(_logger);
|
return ApplePlatformHelper.HasAv1HardwareAccel(_logger);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user