mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 14:33:06 +03:00
Merge pull request #13194 from gnattu/av1-videotoolbox
Enable VideoToolbox AV1 decode
This commit is contained in:
@@ -83,6 +83,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
private bool _isVaapiDeviceSupportVulkanDrmModifier = false;
|
||||
private bool _isVaapiDeviceSupportVulkanDrmInterop = false;
|
||||
|
||||
private bool _isVideoToolboxAv1DecodeAvailable = false;
|
||||
|
||||
private static string[] _vulkanImageDrmFmtModifierExts =
|
||||
{
|
||||
"VK_EXT_image_drm_format_modifier",
|
||||
@@ -159,6 +161,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// <inheritdoc />
|
||||
public bool IsVaapiDeviceSupportVulkanDrmInterop => _isVaapiDeviceSupportVulkanDrmInterop;
|
||||
|
||||
public bool IsVideoToolboxAv1DecodeAvailable => _isVideoToolboxAv1DecodeAvailable;
|
||||
|
||||
[GeneratedRegex(@"[^\/\\]+?(\.[^\/\\\n.]+)?$")]
|
||||
private static partial Regex FfprobePathRegex();
|
||||
|
||||
@@ -261,6 +265,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
_logger.LogInformation("VAAPI device {RenderNodePath} supports Vulkan DRM interop", options.VaapiDevice);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if VideoToolbox supports AV1 decode
|
||||
if (OperatingSystem.IsMacOS() && SupportsHwaccel("videotoolbox"))
|
||||
{
|
||||
_isVideoToolboxAv1DecodeAvailable = validator.CheckIsVideoToolboxAv1DecodeAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
_logger.LogInformation("FFmpeg: {FfmpegPath}", _ffmpegPath ?? string.Empty);
|
||||
|
||||
Reference in New Issue
Block a user