|
@@ -137,7 +137,7 @@ public class PQMovieInput: ImageSource {
|
|
// 画布的大小 注意要是偶数 要不在 IOS 13上会有绿边 自动放大到偶数
|
|
// 画布的大小 注意要是偶数 要不在 IOS 13上会有绿边 自动放大到偶数
|
|
public var mShowVidoSize: CGSize = cVideoCannvasSizeOneToOne {
|
|
public var mShowVidoSize: CGSize = cVideoCannvasSizeOneToOne {
|
|
didSet {
|
|
didSet {
|
|
- FilterLog(message: "mShowVidoSize is move input \(mShowVidoSize)")
|
|
|
|
|
|
+ BFLog(2, message: "mShowVidoSize is move input \(mShowVidoSize)")
|
|
do {
|
|
do {
|
|
displayLink?.isPaused = true
|
|
displayLink?.isPaused = true
|
|
imageFramebuffer = try Framebuffer(context: sharedImageProcessingContext, orientation: .portrait, size: GLSize(width: GLint(mShowVidoSize.width), height: GLint(mShowVidoSize.height)), textureOnly: true)
|
|
imageFramebuffer = try Framebuffer(context: sharedImageProcessingContext, orientation: .portrait, size: GLSize(width: GLint(mShowVidoSize.width), height: GLint(mShowVidoSize.height)), textureOnly: true)
|
|
@@ -151,7 +151,7 @@ public class PQMovieInput: ImageSource {
|
|
// 初始化方法
|
|
// 初始化方法
|
|
public init(asset: AVAsset, videoComposition: AVVideoComposition?, audioMix: AVAudioMix?, playAtActualSpeed: Bool = false, loop: Bool = false, audioSettings: [String: Any]? = nil) throws {
|
|
public init(asset: AVAsset, videoComposition: AVVideoComposition?, audioMix: AVAudioMix?, playAtActualSpeed: Bool = false, loop: Bool = false, audioSettings: [String: Any]? = nil) throws {
|
|
self.asset = asset
|
|
self.asset = asset
|
|
- FilterLog(message: "asset 资源的总时长\(asset.duration.seconds) \(asset.duration)")
|
|
|
|
|
|
+ BFLog(2, message: "asset 资源的总时长\(asset.duration.seconds) \(asset.duration)")
|
|
self.audioMix = audioMix
|
|
self.audioMix = audioMix
|
|
self.audioSettings = audioSettings
|
|
self.audioSettings = audioSettings
|
|
self.videoComposition = videoComposition
|
|
self.videoComposition = videoComposition
|
|
@@ -159,7 +159,7 @@ public class PQMovieInput: ImageSource {
|
|
self.loop = loop
|
|
self.loop = loop
|
|
yuvConversionShader = crashOnShaderCompileFailure("MovieInput") { try sharedImageProcessingContext.programForVertexShader(defaultVertexShaderForInputs(2), fragmentShader: YUVConversionFullRangeFragmentShader) }
|
|
yuvConversionShader = crashOnShaderCompileFailure("MovieInput") { try sharedImageProcessingContext.programForVertexShader(defaultVertexShaderForInputs(2), fragmentShader: YUVConversionFullRangeFragmentShader) }
|
|
if asset.duration.seconds <= 0 {
|
|
if asset.duration.seconds <= 0 {
|
|
- FilterLog(message: "asset 资源的总时长为0,返回")
|
|
|
|
|
|
+ BFLog(2, message: "asset 资源的总时长为0,返回")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -208,7 +208,7 @@ public class PQMovieInput: ImageSource {
|
|
isPlay = false
|
|
isPlay = false
|
|
beginTime = 0
|
|
beginTime = 0
|
|
currentTime = .zero
|
|
currentTime = .zero
|
|
- FilterLog(message: "初始化播放开始时间、\(CMTimeGetSeconds(timeRange.start)) 结束时间\(CMTimeGetSeconds(timeRange.end)) 播放总时长:\(CMTimeGetSeconds(timeRange.end) - CMTimeGetSeconds(timeRange.start))")
|
|
|
|
|
|
+ BFLog(2, message: "初始化播放开始时间、\(CMTimeGetSeconds(timeRange.start)) 结束时间\(CMTimeGetSeconds(timeRange.end)) 播放总时长:\(CMTimeGetSeconds(timeRange.end) - CMTimeGetSeconds(timeRange.start))")
|
|
|
|
|
|
playeTimeRange = timeRange
|
|
playeTimeRange = timeRange
|
|
startTime = playeTimeRange.start
|
|
startTime = playeTimeRange.start
|
|
@@ -218,7 +218,7 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
@objc func displayLinkClick(_ displayLink: CADisplayLink) {
|
|
@objc func displayLinkClick(_ displayLink: CADisplayLink) {
|
|
if assetReader == nil {
|
|
if assetReader == nil {
|
|
- FilterLog(message: "self.assetReader is null !!!!!!!!!!")
|
|
|
|
|
|
+ BFLog(2, message: "self.assetReader is null !!!!!!!!!!")
|
|
displayLink.isPaused = true
|
|
displayLink.isPaused = true
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -246,12 +246,12 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
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)) 总时间:\(CMTimeGetSeconds(playeTimeRange.end) - CMTimeGetSeconds(playeTimeRange.start)) 播放进度当前时间:\(currTime) 进度:\(prgressValue) 帧id \(totalFramesSent)")
|
|
|
|
|
|
+ BFLog(2, 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)")
|
|
|
|
|
|
+ BFLog(2, message: "播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放进度当前时间:\(currTime) 进度:\(prgressValue)")
|
|
if currTime / duration > 1 {
|
|
if currTime / duration > 1 {
|
|
- FilterLog(message: "全部播放完成 总用时为:\(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
|
|
|
+ BFLog(2, message: "全部播放完成 总用时为:\(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
|
|
|
self.completion?()
|
|
self.completion?()
|
|
|
|
|
|
@@ -270,9 +270,9 @@ public class PQMovieInput: ImageSource {
|
|
self.conditionLock.lock()
|
|
self.conditionLock.lock()
|
|
while self.readingShouldWait {
|
|
while self.readingShouldWait {
|
|
self.synchronizedEncodingDebugPrint("Disable reading")
|
|
self.synchronizedEncodingDebugPrint("Disable reading")
|
|
- FilterLog(message: "Disable reading 开始等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) ")
|
|
|
|
|
|
+ BFLog(2, message: "Disable reading 开始等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) ")
|
|
self.conditionLock.wait()
|
|
self.conditionLock.wait()
|
|
- FilterLog(message: "Enable reading 停止等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
|
|
|
+ BFLog(2, message: "Enable reading 停止等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
}
|
|
}
|
|
self.conditionLock.unlock()
|
|
self.conditionLock.unlock()
|
|
|
|
|
|
@@ -305,11 +305,11 @@ public class PQMovieInput: ImageSource {
|
|
@objc public func start(isFreeBuffer: Bool, isExport: Bool = false,timeRange:CMTimeRange = CMTimeRange.init()) {
|
|
@objc public func start(isFreeBuffer: Bool, isExport: Bool = false,timeRange:CMTimeRange = CMTimeRange.init()) {
|
|
|
|
|
|
debugStartTime = CFAbsoluteTimeGetCurrent()
|
|
debugStartTime = CFAbsoluteTimeGetCurrent()
|
|
- FilterLog(message: "开始播放的系统时钟时间 \(String(describing: debugStartTime))")
|
|
|
|
|
|
+ BFLog(2, message: "开始播放的系统时钟时间 \(String(describing: debugStartTime))")
|
|
|
|
|
|
playeTimeRange = timeRange
|
|
playeTimeRange = timeRange
|
|
readerAudioTrackOutput = nil
|
|
readerAudioTrackOutput = nil
|
|
- FilterLog(message: "PQMoveInput开始")
|
|
|
|
|
|
+ BFLog(2, message: "PQMoveInput开始")
|
|
mFreeBuffer = isFreeBuffer
|
|
mFreeBuffer = isFreeBuffer
|
|
assetReader = createReader()
|
|
assetReader = createReader()
|
|
|
|
|
|
@@ -317,7 +317,7 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
isPlay = true
|
|
isPlay = true
|
|
if assetReader == nil {
|
|
if assetReader == nil {
|
|
- FilterLog(message: "assetReader is null!!!!!")
|
|
|
|
|
|
+ BFLog(2, message: "assetReader is null!!!!!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -326,7 +326,7 @@ public class PQMovieInput: ImageSource {
|
|
try NSObject.catchException { [self] in
|
|
try NSObject.catchException { [self] in
|
|
if(mIsExport){
|
|
if(mIsExport){
|
|
guard self.assetReader.startReading() else {
|
|
guard self.assetReader.startReading() else {
|
|
- FilterLog(message: "ERROR: Unable to start reading: \(String(describing: self.assetReader.error))")
|
|
|
|
|
|
+ BFLog(2, message: "ERROR: Unable to start reading: \(String(describing: self.assetReader.error))")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -338,19 +338,19 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
}
|
|
}
|
|
} catch {
|
|
} catch {
|
|
- FilterLog(message: "ERROR: Unable to start reading: \(error)")
|
|
|
|
|
|
+ BFLog(2, message: "ERROR: Unable to start reading: \(error)")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- FilterLog(message: "assetReader.outputs count is \(assetReader.outputs)")
|
|
|
|
|
|
+ BFLog(2, message: "assetReader.outputs count is \(assetReader.outputs)")
|
|
for output in assetReader.outputs {
|
|
for output in assetReader.outputs {
|
|
if output.mediaType == AVMediaType.video {
|
|
if output.mediaType == AVMediaType.video {
|
|
readerVideoTrackOutput = output
|
|
readerVideoTrackOutput = output
|
|
- FilterLog(message: " set readerVideoTrackOutput")
|
|
|
|
|
|
+ BFLog(2, message: " set readerVideoTrackOutput")
|
|
}
|
|
}
|
|
if output.mediaType == AVMediaType.audio {
|
|
if output.mediaType == AVMediaType.audio {
|
|
readerAudioTrackOutput = output
|
|
readerAudioTrackOutput = output
|
|
- FilterLog(message: " set readerAudioTrackOutput")
|
|
|
|
|
|
+ BFLog(2, message: " set readerAudioTrackOutput")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -367,7 +367,7 @@ public class PQMovieInput: ImageSource {
|
|
}
|
|
}
|
|
|
|
|
|
public func cancel() {
|
|
public func cancel() {
|
|
- FilterLog(message: "PQMoveInput取消")
|
|
|
|
|
|
+ BFLog(2, message: "PQMoveInput取消")
|
|
isPlay = false
|
|
isPlay = false
|
|
|
|
|
|
// 将定时器移除主循环
|
|
// 将定时器移除主循环
|
|
@@ -382,7 +382,7 @@ public class PQMovieInput: ImageSource {
|
|
}
|
|
}
|
|
|
|
|
|
public func resume() {
|
|
public func resume() {
|
|
- FilterLog(message: "PQMoveInput恢复播放")
|
|
|
|
|
|
+ BFLog(2, message: "PQMoveInput恢复播放")
|
|
mFreeBuffer = false
|
|
mFreeBuffer = false
|
|
isPlay = true
|
|
isPlay = true
|
|
if !mIsExport{
|
|
if !mIsExport{
|
|
@@ -397,15 +397,15 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
public func pause() {
|
|
public func pause() {
|
|
if !isPlay {
|
|
if !isPlay {
|
|
- FilterLog(message: "还不是播放状态")
|
|
|
|
|
|
+ BFLog(2, message: "还不是播放状态")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
if displayLink == nil {
|
|
if displayLink == nil {
|
|
- FilterLog(message: "displayLink is erorr displaye bug !!!!")
|
|
|
|
|
|
+ BFLog(2, message: "displayLink is erorr displaye bug !!!!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- FilterLog(message: "PQMoveInput暂停 displayLink.timestamp: \(displayLink!.timestamp)")
|
|
|
|
|
|
+ BFLog(2, message: "PQMoveInput暂停 displayLink.timestamp: \(displayLink!.timestamp)")
|
|
isPlay = false
|
|
isPlay = false
|
|
|
|
|
|
// 暂停帧的刷新 true:停 ; false:开始
|
|
// 暂停帧的刷新 true:停 ; false:开始
|
|
@@ -421,7 +421,7 @@ public class PQMovieInput: ImageSource {
|
|
startTime = currentTime
|
|
startTime = currentTime
|
|
}
|
|
}
|
|
|
|
|
|
- FilterLog(message: "暂停时间:\(currTime)")
|
|
|
|
|
|
+ BFLog(2, message: "暂停时间:\(currTime)")
|
|
|
|
|
|
beginTime = 0
|
|
beginTime = 0
|
|
|
|
|
|
@@ -437,7 +437,7 @@ public class PQMovieInput: ImageSource {
|
|
func createReader() -> AVAssetReader? {
|
|
func createReader() -> AVAssetReader? {
|
|
do {
|
|
do {
|
|
let assetReader = try AVAssetReader(asset: asset)
|
|
let assetReader = try AVAssetReader(asset: asset)
|
|
- FilterLog(message: "assetReader init \(assetReader) asset url is \(asset)")
|
|
|
|
|
|
+ BFLog(2, message: "assetReader init \(assetReader) asset url is \(asset)")
|
|
if audioMix == nil {
|
|
if audioMix == nil {
|
|
if let audioTrack = asset.tracks(withMediaType: .audio).first, let _ = audioEncodingTarget {
|
|
if let audioTrack = asset.tracks(withMediaType: .audio).first, let _ = audioEncodingTarget {
|
|
BFLog(1, message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
|
|
BFLog(1, message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
|
|
@@ -451,7 +451,7 @@ public class PQMovieInput: ImageSource {
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- FilterLog(message: "self.asset.tracks is \(asset.tracks.count)")
|
|
|
|
|
|
+ BFLog(2, message: "self.asset.tracks is \(asset.tracks.count)")
|
|
let readerAudioTrackOutput = AVAssetReaderAudioMixOutput(audioTracks: asset.tracks(withMediaType: .audio), audioSettings: audioSettings)
|
|
let readerAudioTrackOutput = AVAssetReaderAudioMixOutput(audioTracks: asset.tracks(withMediaType: .audio), audioSettings: audioSettings)
|
|
readerAudioTrackOutput.audioMix = audioMix
|
|
readerAudioTrackOutput.audioMix = audioMix
|
|
readerAudioTrackOutput.alwaysCopiesSampleData = false
|
|
readerAudioTrackOutput.alwaysCopiesSampleData = false
|
|
@@ -459,21 +459,21 @@ public class PQMovieInput: ImageSource {
|
|
}
|
|
}
|
|
|
|
|
|
assetReader.timeRange = playeTimeRange
|
|
assetReader.timeRange = playeTimeRange
|
|
- FilterLog(message: "初始化播放器开始时间\(CMTimeGetSeconds(assetReader.timeRange.start)) 结束时间\(CMTimeGetSeconds(assetReader.timeRange.end)) 音乐的总时长\(asset.duration.seconds)")
|
|
|
|
|
|
+ BFLog(2, message: "初始化播放器开始时间\(CMTimeGetSeconds(assetReader.timeRange.start)) 结束时间\(CMTimeGetSeconds(assetReader.timeRange.end)) 音乐的总时长\(asset.duration.seconds)")
|
|
|
|
|
|
|
|
|
|
actualStartTime = nil
|
|
actualStartTime = nil
|
|
|
|
|
|
return assetReader
|
|
return assetReader
|
|
} catch {
|
|
} catch {
|
|
- FilterLog(message: "ERROR: Unable to create asset reader: \(error)")
|
|
|
|
|
|
+ BFLog(2, message: "ERROR: Unable to create asset reader: \(error)")
|
|
}
|
|
}
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
func readNextVideoFrame(with _: AVAssetReader) {
|
|
func readNextVideoFrame(with _: AVAssetReader) {
|
|
|
|
|
|
- FilterLog(message: "视频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
+ BFLog(2, message: "视频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
autoreleasepool {
|
|
autoreleasepool {
|
|
synchronizedEncodingDebugPrint("Process frame input")
|
|
synchronizedEncodingDebugPrint("Process frame input")
|
|
@@ -497,12 +497,12 @@ public class PQMovieInput: ImageSource {
|
|
func readNextAudioSample(with assetReader: AVAssetReader, from audioTrackOutput: AVAssetReaderOutput) {
|
|
func readNextAudioSample(with assetReader: AVAssetReader, from audioTrackOutput: AVAssetReaderOutput) {
|
|
|
|
|
|
if(!mIsExport){
|
|
if(!mIsExport){
|
|
- FilterLog(message: "不是导出模式")
|
|
|
|
|
|
+ BFLog(2, message: "不是导出模式")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
if !isPlay {
|
|
if !isPlay {
|
|
- FilterLog(message: "自动停到首帧的不处理音频")
|
|
|
|
|
|
+ BFLog(2, message: "自动停到首帧的不处理音频")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
/*
|
|
/*
|
|
@@ -511,30 +511,30 @@ public class PQMovieInput: ImageSource {
|
|
case failed = 3
|
|
case failed = 3
|
|
case cancelled = 4
|
|
case cancelled = 4
|
|
*/
|
|
*/
|
|
- FilterLog(message: "音频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
+ BFLog(2, message: "音频解码状态\(assetReader.status.rawValue)")
|
|
BFLog(1, message: "音频解码状态\(assetReader.status.rawValue)")
|
|
BFLog(1, message: "音频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
autoreleasepool {
|
|
autoreleasepool {
|
|
guard let sampleBuffer = audioTrackOutput.copyNextSampleBuffer(),CMSampleBufferIsValid(sampleBuffer) else {
|
|
guard let sampleBuffer = audioTrackOutput.copyNextSampleBuffer(),CMSampleBufferIsValid(sampleBuffer) else {
|
|
if(assetReader.status == .completed){
|
|
if(assetReader.status == .completed){
|
|
- FilterLog(message: "提前结束的了!!!!\(String(describing: assetReader.error))")
|
|
|
|
|
|
+ BFLog(2, message: "提前结束的了!!!!\(String(describing: assetReader.error))")
|
|
}
|
|
}
|
|
if let movieOutput = synchronizedMovieOutput {
|
|
if let movieOutput = synchronizedMovieOutput {
|
|
- FilterLog(message: "this is runing assetWriterAudioInput markAsFinished \(String(describing: assetReader.error)) \(assetReader)")
|
|
|
|
|
|
+ BFLog(2, message: "this is runing assetWriterAudioInput markAsFinished \(String(describing: assetReader.error)) \(assetReader)")
|
|
|
|
|
|
movieOutput.movieProcessingContext.runOperationAsynchronously {
|
|
movieOutput.movieProcessingContext.runOperationAsynchronously {
|
|
movieOutput.audioEncodingIsFinished = true
|
|
movieOutput.audioEncodingIsFinished = true
|
|
movieOutput.assetWriterAudioInput?.markAsFinished()
|
|
movieOutput.assetWriterAudioInput?.markAsFinished()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- FilterLog(message: "sampleBuffer is null 速度太快copy is error")
|
|
|
|
|
|
+ BFLog(2, message: "sampleBuffer is null 速度太快copy is error")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
synchronizedEncodingDebugPrint("Process audio sample input")
|
|
synchronizedEncodingDebugPrint("Process audio sample input")
|
|
|
|
|
|
let currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(sampleBuffer)
|
|
let currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(sampleBuffer)
|
|
- FilterLog(message: "处理音频的时间戳 \(CMTimeGetSeconds(currentSampleTime)) 播放时间\(CMTimeGetSeconds(currentTime))")
|
|
|
|
|
|
+ BFLog(2, message: "处理音频的时间戳 \(CMTimeGetSeconds(currentSampleTime)) 播放时间\(CMTimeGetSeconds(currentTime))")
|
|
|
|
|
|
// https://www.itdaan.com/blog/2013/11/28/deb10f90970a5ea33f185c9faf2a0ab3.html
|
|
// https://www.itdaan.com/blog/2013/11/28/deb10f90970a5ea33f185c9faf2a0ab3.html
|
|
if !mFreeBuffer {
|
|
if !mFreeBuffer {
|
|
@@ -567,7 +567,7 @@ public class PQMovieInput: ImageSource {
|
|
totalFrameTimeDuringCapture += currentFrameTime
|
|
totalFrameTimeDuringCapture += currentFrameTime
|
|
|
|
|
|
|
|
|
|
- FilterLog(message: "currentTime is \(String(format: "%.6f", CMTimeGetSeconds(currentTime))) 当前帧渲染时间 : \(String(format: "%.6f",1000.0 * currentFrameTime)) ms Average frame time : \(String(format: "%.6f", 1000.0 * totalFrameTimeDuringCapture / Double(totalFramesSent))) ms totalFrameTimeDuringCapture is \(String(format: "%.6f",totalFrameTimeDuringCapture))")
|
|
|
|
|
|
+ BFLog(2, message: "currentTime is \(String(format: "%.6f", CMTimeGetSeconds(currentTime))) 当前帧渲染时间 : \(String(format: "%.6f",1000.0 * currentFrameTime)) ms Average frame time : \(String(format: "%.6f", 1000.0 * totalFrameTimeDuringCapture / Double(totalFramesSent))) ms totalFrameTimeDuringCapture is \(String(format: "%.6f",totalFrameTimeDuringCapture))")
|
|
|
|
|
|
|
|
|
|
|
|
|