|
@@ -210,15 +210,17 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
|
|
|
|
autoreleasepool {
|
|
autoreleasepool {
|
|
- let duration = Double(Int(CMTimeGetSeconds(playeTimeRange.end) * 1000_000_000)) / 1000_000_000.0 // Only used for the progress block so its acuracy is not critical
|
|
|
|
- self.currentTime = CMTimeMakeWithSeconds(self.beginTime + CMTimeGetSeconds(startTime ?? CMTime.zero), preferredTimescale: 1000_000_000)
|
|
|
|
|
|
+
|
|
|
|
+ let duration = CMTimeGetSeconds(playeTimeRange.end)
|
|
|
|
+
|
|
|
|
+ self.currentTime = CMTimeMakeWithSeconds(self.beginTime + CMTimeGetSeconds(startTime ?? CMTime.zero), preferredTimescale: BASE_FILTER_TIMESCALE)
|
|
self.beginTime = self.beginTime + 1 / 30
|
|
self.beginTime = self.beginTime + 1 / 30
|
|
|
|
|
|
let currTime = CMTimeGetSeconds(self.currentTime)
|
|
let currTime = CMTimeGetSeconds(self.currentTime)
|
|
|
|
|
|
let prgressValue = currTime / Float64(duration)
|
|
let prgressValue = currTime / Float64(duration)
|
|
|
|
|
|
- FilterLog(message: "\(mIsExport) MovieOutput total frames appended:播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放器开始时间:\(CMTimeGetSeconds(playeTimeRange.start)) 播放器原始结束时间:\(CMTimeGetSeconds(playeTimeRange.end)) 播放器高精度结束时间:\(duration) 总时间:\(CMTimeGetSeconds(playeTimeRange.end) - CMTimeGetSeconds(playeTimeRange.start)) 播放进度当前时间:\(currTime) 进度:\(prgressValue) 帧id \(totalFramesSent)")
|
|
|
|
|
|
+ FilterLog(message: "\(mIsExport) MovieOutput total frames appended:播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放器开始时间:\(CMTimeGetSeconds(playeTimeRange.start)) 播放器原始结束时间:\(CMTimeGetSeconds(playeTimeRange.end)) 总时间:\(CMTimeGetSeconds(playeTimeRange.end) - CMTimeGetSeconds(playeTimeRange.start)) 播放进度当前时间:\(currTime) 进度:\(prgressValue) 帧id \(totalFramesSent)")
|
|
totalFramesSent += 1
|
|
totalFramesSent += 1
|
|
|
|
|
|
FilterLog(message: "播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放进度当前时间:\(currTime) 进度:\(prgressValue)")
|
|
FilterLog(message: "播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放进度当前时间:\(currTime) 进度:\(prgressValue)")
|
|
@@ -228,7 +230,7 @@ public class PQMovieInput: ImageSource {
|
|
self.completion?()
|
|
self.completion?()
|
|
|
|
|
|
self.beginTime = 0
|
|
self.beginTime = 0
|
|
- self.currentTime = CMTimeMakeWithSeconds(CMTimeGetSeconds(playeTimeRange.start), preferredTimescale: 1000_000_000)
|
|
|
|
|
|
+ self.currentTime = CMTimeMakeWithSeconds(CMTimeGetSeconds(playeTimeRange.start), preferredTimescale: BASE_FILTER_TIMESCALE)
|
|
self.isPlay = false
|
|
self.isPlay = false
|
|
self.mAutoPause = true
|
|
self.mAutoPause = true
|
|
|
|
|