Ver Fonte

1,跳跃卡点第一个图片黑屏问题 2, movie?.orginStuckRange 精度修改。

jsonwang há 3 anos atrás
pai
commit
78f96a7e3d

+ 12 - 7
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -998,7 +998,7 @@ class PQStuckPointEditerController: PQBaseViewController {
                 // 传给movie 音频的原始卡点
                 let fir = Int64(self.stuckPointsTemp.first ?? 0)
                 let endd = Int64(self.stuckPointsTemp.last ?? 0)
-                self.playerView.movie?.orginStuckRange = CMTimeRange(start: CMTime(value: Int64(fir) * 40, timescale: 40), end: CMTime(value: Int64(endd) * 40, timescale: 40))
+                self.playerView.movie?.orginStuckRange = CMTimeRange(start: CMTime(value: Int64(fir) * Int64(BASE_FILTER_TIMESCALE), timescale: BASE_FILTER_TIMESCALE), end: CMTime(value: Int64(endd) * Int64(BASE_FILTER_TIMESCALE), timescale: BASE_FILTER_TIMESCALE))
 
                 // 5,开始播放
                 self.playerView.isLoop = false
@@ -1134,9 +1134,10 @@ extension PQStuckPointEditerController {
                         
                         if deepCopySticker!.type == StickerType.IMAGE.rawValue {
                             if index + 1 < finallyStuckPoints.count {
-                                deepCopySticker!.timelineIn = Float64("\(finallyStuckPoints[index])") ?? 0.0
-
-                                deepCopySticker!.timelineOut = Float64("\(finallyStuckPoints[index + 1])") ?? 0.0
+                             
+                                deepCopySticker!.timelineIn = Float64(String(format: "%.6f",finallyStuckPoints[index])) ?? 0.0
+                          
+                                deepCopySticker!.timelineOut = Float64(String(format: "%.6f",finallyStuckPoints[index + 1])) ?? 0.0
                                 if deepCopySticker != nil {
                                     deepCopySticker?.generateDefaultValues()
                                     stickers.append(deepCopySticker!)
@@ -1156,9 +1157,13 @@ extension PQStuckPointEditerController {
                             if index + 1 < finallyStuckPoints.count, index < clipFilters.count {
                                 BFLog(message: "bbbbbindexindeindexxindexindexindex \(index) \(point)")
                                 let sticker: PQEditVisionTrackMaterialsModel = clipFilters[index]
-                                sticker.timelineIn = Float64("\(finallyStuckPoints[index])") ?? 0.0
+                                
+                                if(sticker.type == StickerType.IMAGE.rawValue){
+                                    BFLog(message: "当前是image filter !!!!!")
+                                }
+                                sticker.timelineIn = Float64(String(format: "%.6f",finallyStuckPoints[index])) ?? 0.0
 
-                                sticker.timelineOut = Float64("\(finallyStuckPoints[index + 1])") ?? 0.0
+                                sticker.timelineOut = Float64(String(format: "%.6f",finallyStuckPoints[index + 1])) ?? 0.0
                                 // 卡点的时间 >  in out 值 这里就会出现鬼畜效果
                                 let timelineInterval = sticker.timelineOut - sticker.timelineIn
                                 let inOutInterval = sticker.out - sticker.model_in
@@ -1181,7 +1186,7 @@ extension PQStuckPointEditerController {
                                     sticker.out = sticker.out - offsetAssetDuration
                                 }
 
-                                BFLog(message: "测试人员index is \(index)分割后 创建 filter timelineIn :\(sticker.timelineIn) timelineOut :\(sticker.timelineOut)  in :\(sticker.model_in) out:\(sticker.out) type is \(sticker.type) 显示总时长为:\(sticker.timelineOut - sticker.timelineIn)  裁剪总时长\(sticker.out - sticker.model_in)")
+                                BFLog(message: "跳跃卡点测试人员index is \(index)分割后 创建 filter timelineIn :\(sticker.timelineIn) timelineOut :\(sticker.timelineOut)  in :\(sticker.model_in) out:\(sticker.out) type is \(sticker.type) 显示总时长为:\(sticker.timelineOut - sticker.timelineIn)  裁剪总时长\(sticker.out - sticker.model_in)")
 
                                 stickers.append(sticker)
                             }