From 99746e7b478f40c02760666ef5d190098b1b8a9b Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Thu, 12 Dec 2024 23:46:49 +0800 Subject: [PATCH] Fix build --- .../Sources/HLSVideoContent.swift | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/submodules/TelegramUniversalVideoContent/Sources/HLSVideoContent.swift b/submodules/TelegramUniversalVideoContent/Sources/HLSVideoContent.swift index 1bc584994d..319ea2b8b0 100644 --- a/submodules/TelegramUniversalVideoContent/Sources/HLSVideoContent.swift +++ b/submodules/TelegramUniversalVideoContent/Sources/HLSVideoContent.swift @@ -27,15 +27,9 @@ public struct HLSCodecConfiguration { public extension HLSCodecConfiguration { init(context: AccountContext) { + var isHardwareAv1Supported = internal_isHardwareAv1Supported var isSoftwareAv1Supported = false - var length: Int = 4 - var cpuCount: UInt32 = 0 - sysctlbyname("hw.ncpu", &cpuCount, &length, nil, 0) - if cpuCount >= 6 { - isSoftwareAv1Supported = true - } - if let data = context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_enable_hardware_av1"] as? Double { isHardwareAv1Supported = value != 0.0 } @@ -43,10 +37,6 @@ public extension HLSCodecConfiguration { isSoftwareAv1Supported = value != 0.0 } - if "".isEmpty { - isSoftwareAv1Supported = false - } - self.init(isHardwareAv1Supported: isHardwareAv1Supported, isSoftwareAv1Supported: isSoftwareAv1Supported) } }