|
@@ -277,10 +277,11 @@ public class PQCompositionExporter {
|
|
|
|
|
|
}else{
|
|
|
if(weatMaskFilter != nil){
|
|
|
-
|
|
|
+ BFLog(1, message: "find show stricker")
|
|
|
currentTarget.addTarget(showFitler!, atTargetIndex: 0)
|
|
|
showFitler?.addTarget(weatMaskFilter!, atTargetIndex: 0)
|
|
|
weatMaskFilter?.addTarget(output!, atTargetIndex: 0)
|
|
|
+
|
|
|
}else{
|
|
|
currentTarget.addTarget(showFitler!, atTargetIndex: 0)
|
|
|
showFitler?.addTarget(output!, atTargetIndex: 0)
|
|
@@ -296,10 +297,10 @@ public class PQCompositionExporter {
|
|
|
}
|
|
|
|
|
|
public func start(playeTimeRange:CMTimeRange = CMTimeRange.init()) {
|
|
|
- input?.completion = { [unowned self] in
|
|
|
- self.output?.finishRecording { [weak self] in
|
|
|
+ input?.completion = { [weak self] in
|
|
|
+ self?.output?.finishRecording { [weak self] in
|
|
|
BFLog(message: "导出视频完成发通知")
|
|
|
- DispatchQueue.main.async {
|
|
|
+ DispatchQueue.main.async {[weak self] in
|
|
|
if let url = self?.tmpExportURL {
|
|
|
self?.handleCaption(for: AVURLAsset(url: url, options: nil))
|
|
|
} else {
|
|
@@ -321,13 +322,13 @@ public class PQCompositionExporter {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- output?.startRecording { [unowned self] started, error in
|
|
|
+ output?.startRecording { [weak self] started, error in
|
|
|
guard started else {
|
|
|
NXLog(message: "MovieOutput unable to start writing with error: \(String(describing: error)) ")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- self.input?.start(isFreeBuffer: false, isExport: true,timeRange: playeTimeRange)
|
|
|
+ self?.input?.start(isFreeBuffer: false, isExport: true,timeRange: playeTimeRange)
|
|
|
}
|
|
|
}
|
|
|
|