|
@@ -141,7 +141,7 @@ public class PQMovieInput: ImageSource {
|
|
|
// 画布的大小 注意要是偶数 要不在 IOS 13上会有绿边 自动放大到偶数
|
|
|
public var mShowVidoSize: CGSize = cVideoCannvasSizeOneToOne {
|
|
|
didSet {
|
|
|
- FilterLog(2, message: "mShowVidoSize is move input \(mShowVidoSize)")
|
|
|
+ BFLog(2, message: "mShowVidoSize is move input \(mShowVidoSize)")
|
|
|
do {
|
|
|
displayLink?.isPaused = true
|
|
|
imageFramebuffer = try Framebuffer(context: sharedImageProcessingContext, orientation: .portrait, size: GLSize(width: GLint(mShowVidoSize.width), height: GLint(mShowVidoSize.height)), textureOnly: true)
|
|
@@ -155,7 +155,7 @@ public class PQMovieInput: ImageSource {
|
|
|
// 初始化方法
|
|
|
public init(asset: AVAsset, videoComposition: AVVideoComposition?, audioMix: AVAudioMix?, playAtActualSpeed: Bool = false, loop: Bool = false, audioSettings: [String: Any]? = nil) throws {
|
|
|
self.asset = asset
|
|
|
- FilterLog(2, message: "asset 资源的总时长\(asset.duration.seconds) \(asset.duration)")
|
|
|
+ BFLog(2, message: "asset 资源的总时长\(asset.duration.seconds) \(asset.duration)")
|
|
|
self.audioMix = audioMix
|
|
|
self.audioSettings = audioSettings
|
|
|
self.videoComposition = videoComposition
|
|
@@ -163,7 +163,7 @@ public class PQMovieInput: ImageSource {
|
|
|
self.loop = loop
|
|
|
yuvConversionShader = crashOnShaderCompileFailure("MovieInput") { try sharedImageProcessingContext.programForVertexShader(defaultVertexShaderForInputs(2), fragmentShader: YUVConversionFullRangeFragmentShader) }
|
|
|
if asset.duration.seconds <= 0 {
|
|
|
- FilterLog(2, message: "asset 资源的总时长为0,返回")
|
|
|
+ BFLog(2, message: "asset 资源的总时长为0,返回")
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -200,7 +200,7 @@ public class PQMovieInput: ImageSource {
|
|
|
self.audioInputStatusObserver?.invalidate()
|
|
|
self.avPlayerTimeObserver?.invalidate()
|
|
|
|
|
|
- FilterLog(1, message: "movieinput release")
|
|
|
+ BFLog(1, message: "movieinput release")
|
|
|
}
|
|
|
|
|
|
// MARK: -
|
|
@@ -212,7 +212,7 @@ public class PQMovieInput: ImageSource {
|
|
|
isPlay = false
|
|
|
beginTime = 0
|
|
|
currentTime = .zero
|
|
|
- FilterLog(2, 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
|
|
|
startTime = playeTimeRange.start
|
|
@@ -222,7 +222,7 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
@objc func displayLinkClick(_ displayLink: CADisplayLink) {
|
|
|
if assetReader == nil {
|
|
|
- FilterLog(2, message: "self.assetReader is null !!!!!!!!!!")
|
|
|
+ BFLog(2, message: "self.assetReader is null !!!!!!!!!!")
|
|
|
displayLink.isPaused = true
|
|
|
return
|
|
|
}
|
|
@@ -245,7 +245,7 @@ public class PQMovieInput: ImageSource {
|
|
|
if(midTime < 0.0001){
|
|
|
midTime = 0
|
|
|
}
|
|
|
- FilterLog(message: "CFAbsoluteTimeGetCurrent()\(CFAbsoluteTimeGetCurrent()) - self.beginTime is:::::\(self.beginTime) 差值 \(midTime)")
|
|
|
+ BFLog(message: "CFAbsoluteTimeGetCurrent()\(CFAbsoluteTimeGetCurrent()) - self.beginTime is:::::\(self.beginTime) 差值 \(midTime)")
|
|
|
|
|
|
self.currentTime = CMTimeMakeWithSeconds(midTime + CMTimeGetSeconds(startTime ?? CMTime.zero), preferredTimescale: BASE_FILTER_TIMESCALE)
|
|
|
}else {
|
|
@@ -257,12 +257,12 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
let prgressValue = currTime / Float64(duration)
|
|
|
|
|
|
- FilterLog(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)")
|
|
|
+ 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
|
|
|
|
|
|
- FilterLog(2, message: "2222222222播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放进度当前时间:\(currTime) 总时间为:\(duration)进度:\(prgressValue) 音频时长:\( CMTimeGetSeconds(asset.duration) )")
|
|
|
+ BFLog(2, message: "2222222222播放进行中 总用时: \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) 播放进度当前时间:\(currTime) 总时间为:\(duration)进度:\(prgressValue) 音频时长:\( CMTimeGetSeconds(asset.duration) )")
|
|
|
if currTime / duration > 1{
|
|
|
- FilterLog(2, message: "全部播放完成 总用时为:\(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
+ BFLog(2, message: "全部播放完成 总用时为:\(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
if(self.completion != nil){
|
|
|
self.completion?()
|
|
|
}
|
|
@@ -276,7 +276,7 @@ public class PQMovieInput: ImageSource {
|
|
|
if !mIsExport {
|
|
|
self.start(isFreeBuffer: true,timeRange: playeTimeRange)
|
|
|
}else{
|
|
|
- FilterLog(message: "强制停止!!!!")
|
|
|
+ BFLog(message: "强制停止!!!!")
|
|
|
displayLink.isPaused = true
|
|
|
return
|
|
|
}
|
|
@@ -286,9 +286,9 @@ public class PQMovieInput: ImageSource {
|
|
|
self.conditionLock.lock()
|
|
|
while self.readingShouldWait {
|
|
|
self.synchronizedEncodingDebugPrint("Disable reading")
|
|
|
- FilterLog(2, message: "Disable reading 开始等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) ")
|
|
|
+ BFLog(2, message: "Disable reading 开始等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0)) ")
|
|
|
self.conditionLock.wait()
|
|
|
- FilterLog(2, message: "Enable reading 停止等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
+ BFLog(2, message: "Enable reading 停止等待 \(CFAbsoluteTimeGetCurrent() - (debugStartTime ?? 0.0))")
|
|
|
}
|
|
|
self.conditionLock.unlock()
|
|
|
|
|
@@ -321,11 +321,11 @@ public class PQMovieInput: ImageSource {
|
|
|
@objc public func start(isFreeBuffer: Bool, isExport: Bool = false,timeRange:CMTimeRange = CMTimeRange.init()) {
|
|
|
|
|
|
debugStartTime = CFAbsoluteTimeGetCurrent()
|
|
|
- FilterLog(2, message: "开始播放的系统时钟时间 \(String(describing: debugStartTime))")
|
|
|
+ BFLog(2, message: "开始播放的系统时钟时间 \(String(describing: debugStartTime))")
|
|
|
|
|
|
playeTimeRange = timeRange
|
|
|
readerAudioTrackOutput = nil
|
|
|
- FilterLog(2, message: "PQMoveInput开始")
|
|
|
+ BFLog(2, message: "PQMoveInput开始")
|
|
|
mFreeBuffer = isFreeBuffer
|
|
|
assetReader = createReader()
|
|
|
|
|
@@ -333,7 +333,7 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
isPlay = true
|
|
|
if assetReader == nil {
|
|
|
- FilterLog(2, message: "assetReader is null!!!!!")
|
|
|
+ BFLog(2, message: "assetReader is null!!!!!")
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -342,7 +342,7 @@ public class PQMovieInput: ImageSource {
|
|
|
try NSObject.catchException { [self] in
|
|
|
if(!isUsedAVPlayer){
|
|
|
guard self.assetReader.startReading() else {
|
|
|
- FilterLog(2, 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
|
|
|
}
|
|
|
}else{
|
|
@@ -354,19 +354,19 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
}
|
|
|
} catch {
|
|
|
- FilterLog(2, message: "ERROR: Unable to start reading: \(error)")
|
|
|
+ BFLog(2, message: "ERROR: Unable to start reading: \(error)")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- FilterLog(2, message: "assetReader.outputs count is \(assetReader.outputs)")
|
|
|
+ BFLog(2, message: "assetReader.outputs count is \(assetReader.outputs)")
|
|
|
for output in assetReader.outputs {
|
|
|
if output.mediaType == AVMediaType.video {
|
|
|
readerVideoTrackOutput = output
|
|
|
- FilterLog(2, message: " set readerVideoTrackOutput")
|
|
|
+ BFLog(2, message: " set readerVideoTrackOutput")
|
|
|
}
|
|
|
if output.mediaType == AVMediaType.audio {
|
|
|
readerAudioTrackOutput = output
|
|
|
- FilterLog(2, message: " set readerAudioTrackOutput")
|
|
|
+ BFLog(2, message: " set readerAudioTrackOutput")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -383,7 +383,7 @@ public class PQMovieInput: ImageSource {
|
|
|
}
|
|
|
|
|
|
public func cancel() {
|
|
|
- FilterLog(2, message: "PQMoveInput取消")
|
|
|
+ BFLog(2, message: "PQMoveInput取消")
|
|
|
isPlay = false
|
|
|
|
|
|
// 将定时器移除主循环
|
|
@@ -398,7 +398,7 @@ public class PQMovieInput: ImageSource {
|
|
|
}
|
|
|
|
|
|
public func resume() {
|
|
|
- FilterLog(2, message: "PQMoveInput恢复播放")
|
|
|
+ BFLog(2, message: "PQMoveInput恢复播放")
|
|
|
mFreeBuffer = false
|
|
|
isPlay = true
|
|
|
if !mIsExport{
|
|
@@ -413,15 +413,15 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
public func pause() {
|
|
|
if !isPlay {
|
|
|
- FilterLog(2, message: "还不是播放状态")
|
|
|
+ BFLog(2, message: "还不是播放状态")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
if displayLink == nil {
|
|
|
- FilterLog(2, message: "displayLink is erorr displaye bug !!!!")
|
|
|
+ BFLog(2, message: "displayLink is erorr displaye bug !!!!")
|
|
|
return
|
|
|
}
|
|
|
- FilterLog(2, message: "PQMoveInput暂停 displayLink.timestamp: \(displayLink!.timestamp)")
|
|
|
+ BFLog(2, message: "PQMoveInput暂停 displayLink.timestamp: \(displayLink!.timestamp)")
|
|
|
isPlay = false
|
|
|
|
|
|
// 暂停帧的刷新 true:停 ; false:开始
|
|
@@ -437,7 +437,7 @@ public class PQMovieInput: ImageSource {
|
|
|
startTime = currentTime
|
|
|
}
|
|
|
|
|
|
- FilterLog(2, message: "暂停时间:\(currTime)")
|
|
|
+ BFLog(2, message: "暂停时间:\(currTime)")
|
|
|
|
|
|
beginTime = 0
|
|
|
|
|
@@ -453,10 +453,10 @@ public class PQMovieInput: ImageSource {
|
|
|
func createReader() -> AVAssetReader? {
|
|
|
do {
|
|
|
let assetReader = try AVAssetReader(asset: asset)
|
|
|
- FilterLog(2, message: "assetReader init \(assetReader) asset url is \(asset)")
|
|
|
+ BFLog(2, message: "assetReader init \(assetReader) asset url is \(asset)")
|
|
|
if audioMix == nil {
|
|
|
if let audioTrack = asset.tracks(withMediaType: .audio).first, let _ = audioEncodingTarget {
|
|
|
- FilterLog(1, message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
|
|
|
+ BFLog(1, message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
|
|
|
|
|
|
let readerAudioTrackOutput = AVAssetReaderTrackOutput(track: audioTrack, outputSettings: audioSettings)
|
|
|
readerAudioTrackOutput.alwaysCopiesSampleData = false
|
|
@@ -467,7 +467,7 @@ public class PQMovieInput: ImageSource {
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- FilterLog(2, 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)
|
|
|
readerAudioTrackOutput.audioMix = audioMix
|
|
|
readerAudioTrackOutput.alwaysCopiesSampleData = false
|
|
@@ -475,21 +475,21 @@ public class PQMovieInput: ImageSource {
|
|
|
}
|
|
|
|
|
|
assetReader.timeRange = playeTimeRange
|
|
|
- FilterLog(2, 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
|
|
|
|
|
|
return assetReader
|
|
|
} catch {
|
|
|
- FilterLog(2, message: "ERROR: Unable to create asset reader: \(error)")
|
|
|
+ BFLog(2, message: "ERROR: Unable to create asset reader: \(error)")
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func readNextVideoFrame(with _: AVAssetReader) {
|
|
|
|
|
|
- FilterLog(2, message: "视频解码状态\(assetReader.status.rawValue)")
|
|
|
+ BFLog(2, message: "视频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
autoreleasepool {
|
|
|
synchronizedEncodingDebugPrint("Process frame input")
|
|
@@ -501,7 +501,7 @@ public class PQMovieInput: ImageSource {
|
|
|
|
|
|
|
|
|
let prgressValue = (currTime - start) / (duration - start)
|
|
|
-// FilterLog(1, message: "\(mIsExport) movinput 当前时间 is \(currTime) curr当前进度:\(prgressValue)")
|
|
|
+// BFLog(1, message: "\(mIsExport) movinput 当前时间 is \(currTime) curr当前进度:\(prgressValue)")
|
|
|
progress?(currTime, duration, prgressValue)
|
|
|
|
|
|
sharedImageProcessingContext.runOperationSynchronously { [weak self] in
|
|
@@ -513,12 +513,12 @@ public class PQMovieInput: ImageSource {
|
|
|
func readNextAudioSample(with assetReader: AVAssetReader, from audioTrackOutput: AVAssetReaderOutput) {
|
|
|
|
|
|
if(isUsedAVPlayer){
|
|
|
- FilterLog(2, message: "使用的 avplayer 播放模式")
|
|
|
+ BFLog(2, message: "使用的 avplayer 播放模式")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
if !isPlay {
|
|
|
- FilterLog(2, message: "自动停到首帧的不处理音频")
|
|
|
+ BFLog(2, message: "自动停到首帧的不处理音频")
|
|
|
return
|
|
|
}
|
|
|
/*
|
|
@@ -527,35 +527,35 @@ public class PQMovieInput: ImageSource {
|
|
|
case failed = 3
|
|
|
case cancelled = 4
|
|
|
*/
|
|
|
- FilterLog(2, message: "音频解码状态\(assetReader.status.rawValue)")
|
|
|
+ BFLog(2, message: "音频解码状态\(assetReader.status.rawValue)")
|
|
|
|
|
|
autoreleasepool {
|
|
|
guard let sampleBuffer = audioTrackOutput.copyNextSampleBuffer(),CMSampleBufferIsValid(sampleBuffer) else {
|
|
|
if(assetReader.status == .completed){
|
|
|
- FilterLog(2, message: "提前结束的了!!!!\(String(describing: assetReader.error))")
|
|
|
+ BFLog(2, message: "提前结束的了!!!!\(String(describing: assetReader.error))")
|
|
|
}
|
|
|
if let movieOutput = synchronizedMovieOutput {
|
|
|
- FilterLog(2, 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.audioEncodingIsFinished = true
|
|
|
movieOutput.assetWriterAudioInput?.markAsFinished()
|
|
|
}
|
|
|
}
|
|
|
- FilterLog(2, message: "sampleBuffer is null 速度太快copy is error")
|
|
|
+ BFLog(2, message: "sampleBuffer is null 速度太快copy is error")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
synchronizedEncodingDebugPrint("Process audio sample input")
|
|
|
|
|
|
let currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(sampleBuffer)
|
|
|
- FilterLog(2, message: "处理音频的时间戳 \(CMTimeGetSeconds(currentSampleTime)) 播放时间\(CMTimeGetSeconds(currentTime))")
|
|
|
+ BFLog(2, message: "处理音频的时间戳 \(CMTimeGetSeconds(currentSampleTime)) 播放时间\(CMTimeGetSeconds(currentTime))")
|
|
|
|
|
|
// https://www.itdaan.com/blog/2013/11/28/deb10f90970a5ea33f185c9faf2a0ab3.html
|
|
|
if !mFreeBuffer {
|
|
|
audioEncodingTarget?.processAudioBuffer(sampleBuffer)
|
|
|
}else{
|
|
|
- FilterLog(message: "不播放音频!!!!")
|
|
|
+ BFLog(message: "不播放音频!!!!")
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -565,7 +565,7 @@ public class PQMovieInput: ImageSource {
|
|
|
let startPTime = CFAbsoluteTimeGetCurrent()
|
|
|
|
|
|
imageFramebuffer.lock()
|
|
|
- FilterLog(message: "mIsExport:\(mIsExport) 实际设置的每一帧时间戳:\(CMTimeGetSeconds(currentTime))")
|
|
|
+ BFLog(message: "mIsExport:\(mIsExport) 实际设置的每一帧时间戳:\(CMTimeGetSeconds(currentTime))")
|
|
|
// 设置当前帧的时间戳
|
|
|
imageFramebuffer.timingStyle = .videoFrame(timestamp: Timestamp(currentTime))
|
|
|
|
|
@@ -582,7 +582,7 @@ public class PQMovieInput: ImageSource {
|
|
|
totalFrameTimeDuringCapture += currentFrameTime
|
|
|
|
|
|
|
|
|
- FilterLog(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))")
|
|
|
+ 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))")
|
|
|
|
|
|
|
|
|
|
|
@@ -638,7 +638,7 @@ public class PQMovieInput: ImageSource {
|
|
|
conditionLock.signal()
|
|
|
|
|
|
} else {
|
|
|
- FilterLog(1, message: "MovieOutput total frames appended 要加锁了")
|
|
|
+ BFLog(1, message: "MovieOutput total frames appended 要加锁了")
|
|
|
readingShouldWait = true
|
|
|
}
|
|
|
conditionLock.unlock()
|
|
@@ -730,7 +730,7 @@ extension PQMovieInput {
|
|
|
let range = strongSelf.musicPlayRanges?[strongSelf.indexRage]
|
|
|
playerItem.forwardPlaybackEndTime = range!.end
|
|
|
playerItem.reversePlaybackEndTime = range!.start
|
|
|
-// FilterLog(1, message: "curr: start ********************\(CMTimeGetSeconds(range.start)) - \(playerItem.reversePlaybackEndTime) - \(playerItem.forwardPlaybackEndTime)")
|
|
|
+// BFLog(1, message: "curr: start ********************\(CMTimeGetSeconds(range.start)) - \(playerItem.reversePlaybackEndTime) - \(playerItem.forwardPlaybackEndTime)")
|
|
|
strongSelf.avPlayer!.seek(to: playerItem.reversePlaybackEndTime) { isSuccess in
|
|
|
playerItem.seek(to: playerItem.reversePlaybackEndTime) { isSuccess in
|
|
|
strongSelf.avPlayer!.play()
|
|
@@ -743,7 +743,7 @@ extension PQMovieInput {
|
|
|
|
|
|
// avPlayerTimeObserver = avPlayer!.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 4), queue: DispatchQueue.global()) {[weak self] time in
|
|
|
// // 进度监控
|
|
|
-// FilterLog(1, message: "cont:\(CMTimeGetSeconds(time) - CMTimeGetSeconds((self?.musicPlayRanges?.first!.start)!)), curr:\(CMTimeGetSeconds(time))")
|
|
|
+// BFLog(1, message: "cont:\(CMTimeGetSeconds(time) - CMTimeGetSeconds((self?.musicPlayRanges?.first!.start)!)), curr:\(CMTimeGetSeconds(time))")
|
|
|
// } as? NSKeyValueObservation
|
|
|
}
|
|
|
|