mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
ffmpeg bugfixes
This commit is contained in:
@@ -1,10 +1,30 @@
|
||||
|
||||
#if !os(macOS)
|
||||
import UIKit
|
||||
#else
|
||||
import AppKit
|
||||
#endif
|
||||
import CoreMedia
|
||||
import Accelerate
|
||||
import FFMpegBinding
|
||||
|
||||
private let bufferCount = 32
|
||||
|
||||
|
||||
|
||||
#if os(macOS)
|
||||
private let deviceColorSpace: CGColorSpace = {
|
||||
if #available(OSX 10.11.2, *) {
|
||||
if let colorSpace = CGColorSpace(name: CGColorSpace.displayP3) {
|
||||
return colorSpace
|
||||
} else {
|
||||
return CGColorSpaceCreateDeviceRGB()
|
||||
}
|
||||
} else {
|
||||
return CGColorSpaceCreateDeviceRGB()
|
||||
}
|
||||
}()
|
||||
#else
|
||||
private let deviceColorSpace: CGColorSpace = {
|
||||
if #available(iOSApplicationExtension 9.3, iOS 9.3, *) {
|
||||
if let colorSpace = CGColorSpace(name: CGColorSpace.displayP3) {
|
||||
@@ -16,7 +36,7 @@ private let deviceColorSpace: CGColorSpace = {
|
||||
return CGColorSpaceCreateDeviceRGB()
|
||||
}
|
||||
}()
|
||||
|
||||
#endif
|
||||
public final class FFMpegMediaVideoFrameDecoder: MediaTrackFrameDecoder {
|
||||
public enum ReceiveResult {
|
||||
case error
|
||||
|
||||
Reference in New Issue
Block a user