| 
														
															@@ -14,7 +14,7 @@ import BFCommonKit 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public class PQCompositionExporter { 
														 | 
														
														 | 
														
															 public class PQCompositionExporter { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public var progressClosure: ((_ currTime: Float, _ duration: Float, _ progress: Float) -> Void)? 
														 | 
														
														 | 
														
															     public var progressClosure: ((_ currTime: Float, _ duration: Float, _ progress: Float) -> Void)? 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    public var completion: ((_ url: URL) -> Void)? 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public var completion: ((_ url: URL?) -> Void)? 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public let asset: AVAsset 
														 | 
														
														 | 
														
															     public let asset: AVAsset 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public let videoComposition: AVVideoComposition? 
														 | 
														
														 | 
														
															     public let videoComposition: AVVideoComposition? 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -297,14 +297,14 @@ public class PQCompositionExporter { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public func start(playeTimeRange:CMTimeRange = CMTimeRange.init()) { 
														 | 
														
														 | 
														
															     public func start(playeTimeRange:CMTimeRange = CMTimeRange.init()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         input?.completion = { [unowned self] in 
														 | 
														
														 | 
														
															         input?.completion = { [unowned self] in 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            self.output?.finishRecording { [unowned self] in 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            self.output?.finishRecording { [weak self] in 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 BFLog(message: "导出视频完成发通知") 
														 | 
														
														 | 
														
															                 BFLog(message: "导出视频完成发通知") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 DispatchQueue.main.async { 
														 | 
														
														 | 
														
															                 DispatchQueue.main.async { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    if let url = self.tmpExportURL { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        self.handleCaption(for: AVURLAsset(url: url, options: nil)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    if let url = self?.tmpExportURL { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        self?.handleCaption(for: AVURLAsset(url: url, options: nil)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } else { 
														 | 
														
														 | 
														
															                     } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        self.progressClosure?(0, 0, 1) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        self.completion?(self.exportURL) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        self?.progressClosure?(0, 0, 1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        self?.completion?(self?.exportURL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 |