Skip to content

Commit 99746e7

Browse files
author
Isaac
committed
Fix build
1 parent 8b89834 commit 99746e7

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

submodules/TelegramUniversalVideoContent/Sources/HLSVideoContent.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,16 @@ public struct HLSCodecConfiguration {
2727

2828
public extension HLSCodecConfiguration {
2929
init(context: AccountContext) {
30+
var isHardwareAv1Supported = internal_isHardwareAv1Supported
3031
var isSoftwareAv1Supported = false
3132

32-
var length: Int = 4
33-
var cpuCount: UInt32 = 0
34-
sysctlbyname("hw.ncpu", &cpuCount, &length, nil, 0)
35-
if cpuCount >= 6 {
36-
isSoftwareAv1Supported = true
37-
}
38-
3933
if let data = context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_enable_hardware_av1"] as? Double {
4034
isHardwareAv1Supported = value != 0.0
4135
}
4236
if let data = context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_enable_software_av1"] as? Double {
4337
isSoftwareAv1Supported = value != 0.0
4438
}
4539

46-
if "".isEmpty {
47-
isSoftwareAv1Supported = false
48-
}
49-
5040
self.init(isHardwareAv1Supported: isHardwareAv1Supported, isSoftwareAv1Supported: isSoftwareAv1Supported)
5141
}
5242
}

0 commit comments

Comments
 (0)