Reimplement video stickers

This commit is contained in:
Ilya Laktyushin
2022-01-27 13:06:44 +03:00
parent 97f224f0a8
commit bbc082e991
60 changed files with 1611 additions and 1462 deletions

View File

@@ -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)