mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Reimplement video stickers
This commit is contained in:
@@ -199,6 +199,14 @@ public final class SoftwareVideoSource {
|
||||
return (frames.first, endOfStream)
|
||||
}
|
||||
|
||||
public func getFramerate() -> Int {
|
||||
if let videoStream = self.videoStream {
|
||||
return Int(videoStream.fps.seconds)
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
public func readFrame(maxPts: CMTime?) -> (MediaTrackFrame?, CGFloat, CGFloat, Bool) {
|
||||
guard let videoStream = self.videoStream, let avFormatContext = self.avFormatContext else {
|
||||
return (nil, 0.0, 1.0, false)
|
||||
|
||||
Reference in New Issue
Block a user