[WIP] Stickers editor

This commit is contained in:
Ilya Laktyushin
2024-04-10 17:37:37 +04:00
parent d4c13120f8
commit 3e3b04e495
17 changed files with 486 additions and 279 deletions

View File

@@ -69,6 +69,8 @@ public final class SoftwareVideoSource {
private var enqueuedFrames: [(MediaTrackFrame, CGFloat, CGFloat, Bool)] = []
private var hasReadToEnd: Bool = false
public private(set) var reportedDuration: CMTime = .invalid
public init(path: String, hintVP9: Bool, unpremultiplyAlpha: Bool) {
let _ = FFMpegMediaFrameSourceContextHelpers.registerFFMpegGlobals
@@ -142,6 +144,8 @@ public final class SoftwareVideoSource {
}
}
self.reportedDuration = CMTime(seconds: avFormatContext.duration(), preferredTimescale: CMTimeScale(NSEC_PER_SEC))
self.videoStream = videoStream
if let videoStream = self.videoStream {