mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
ffmpeg bugfixes
This commit is contained in:
parent
dbc9f77d9b
commit
3eb27c28c8
@ -283,6 +283,9 @@ public final class FFMpegMediaFrameSource: NSObject, MediaFrameSource {
|
||||
let _ = currentSemaphore.swap(nil)
|
||||
subscriber.putError(.generic)
|
||||
}
|
||||
} else {
|
||||
let _ = currentSemaphore.swap(nil)
|
||||
subscriber.putError(.generic)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user