|
@@ -274,7 +274,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
// 设置画布比例
|
|
|
public func resetCanvasFrame(frame: CGRect) {
|
|
|
if self.frame.equalTo(frame) {
|
|
|
- BFLog(message: "新老值一样,不重置")
|
|
|
+ FilterLog(message: "新老值一样,不重置")
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -284,7 +284,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
showBorderLayer()
|
|
|
}
|
|
|
|
|
|
- BFLog(message: "new frame is \(frame)")
|
|
|
+ FilterLog(message: "new frame is \(frame)")
|
|
|
renderView.isHidden = true
|
|
|
renderView.frame = CGRect(x: 0, y: 0, width: self.frame.size.width, height: self.frame.size.height)
|
|
|
renderView.resatSize()
|
|
@@ -333,10 +333,10 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
var composition: AVMutableComposition?
|
|
|
|
|
|
let asset = AVURLAsset(url: url, options: nil)
|
|
|
- BFLog(message: "播放器初始化的音频时长\(asset.duration.seconds) url is \(url)")
|
|
|
+ FilterLog(message: "播放器初始化的音频时长\(asset.duration.seconds) url is \(url)")
|
|
|
self.asset = asset
|
|
|
if (audioMixModel != nil && audioMixModel?.localPath != nil) || (videoStickers != nil && (videoStickers?.count ?? 0) > 0) {
|
|
|
- BFLog(message: "有参加混音的数据。")
|
|
|
+ FilterLog(message: "有参加混音的数据。")
|
|
|
(audioMix, composition) = PQPlayerViewModel.setupAudioMix(originAsset: asset, bgmData: audioMixModel, videoStickers: videoStickers)
|
|
|
} else {
|
|
|
audioMix = nil
|
|
@@ -358,7 +358,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
}
|
|
|
do {
|
|
|
if composition != nil {
|
|
|
- BFLog(message: "composition 方式初始化")
|
|
|
+ FilterLog(message: "composition 方式初始化")
|
|
|
movie = try PQMovieInput(asset: composition!, videoComposition: videoComposition, audioMix: audioMix, playAtActualSpeed: true, loop: isLoop, audioSettings: audioSettings)
|
|
|
} else {
|
|
|
movie = try PQMovieInput(url: url, playAtActualSpeed: true, loop: isLoop, audioSettings: audioSettings)
|
|
@@ -427,7 +427,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
// 初始化缓存,默认选创建 cacheFiltersMaxCount 个缓存 filterrs
|
|
|
func configCache() {
|
|
|
cacheFilters.removeAll()
|
|
|
- BFLog(message: "原素材 总数:\(mStickers?.count ?? 0) ")
|
|
|
+ FilterLog(message: "原素材 总数:\(mStickers?.count ?? 0) ")
|
|
|
|
|
|
if mStickers?.count ?? 0 > 0 {
|
|
|
|
|
@@ -471,7 +471,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
|
|
|
//创建下一个filter 数据
|
|
|
func createNextFilter() {
|
|
|
- BFLog(message: "加入前 当前的缓存个数为: \(cacheFilters.count) maxCount \(cacheFiltersMaxCount) 最后一个显示时间 \(String(describing: cacheFilters.last?.stickerInfo?.timelineIn))")
|
|
|
+ FilterLog(message: "加入前 当前的缓存个数为: \(cacheFilters.count) maxCount \(cacheFiltersMaxCount) 最后一个显示时间 \(String(describing: cacheFilters.last?.stickerInfo?.timelineIn))")
|
|
|
if cacheFilters.count <= cacheFiltersMaxCount {
|
|
|
let showIndex = mStickers?.firstIndex(where: { (sticker) -> Bool in
|
|
|
(cacheFilters.last?.stickerInfo == sticker)
|
|
@@ -546,7 +546,7 @@ public class PQGPUImagePlayerView: UIView {
|
|
|
//高斯层
|
|
|
let json = showFilter.stickerInfo?.toJSONString(prettyPrint: false)
|
|
|
if json == nil {
|
|
|
- BFLog(message: "数据转换有问题 跳转")
|
|
|
+ FilterLog(message: "数据转换有问题 跳转")
|
|
|
return
|
|
|
}
|
|
|
let blurStickerModel: PQEditVisionTrackMaterialsModel? = Mapper<PQEditVisionTrackMaterialsModel>().map(JSONString: json!)
|
|
@@ -606,7 +606,7 @@ public extension PQGPUImagePlayerView {
|
|
|
self.progressLab.isHidden = false
|
|
|
}
|
|
|
// guard status != .playing else {
|
|
|
-// BFLog(message: "已经是播放状态")
|
|
|
+// FilterLog(message: "已经是播放状态")
|
|
|
// return
|
|
|
// }
|
|
|
|
|
@@ -665,7 +665,7 @@ public extension PQGPUImagePlayerView {
|
|
|
|
|
|
// 显示提示文字
|
|
|
func showTip(show: Bool) {
|
|
|
- BFLog(message: "showTip \(show)")
|
|
|
+ FilterLog(message: "showTip \(show)")
|
|
|
tipLab.isHidden = !show
|
|
|
if show {
|
|
|
playerEmptyView.isHidden = true
|