Przeglądaj źródła

1,图片缓存 1.5时长 2,进入编辑界面后去掉图片的时长

jsonwang 3 lat temu
rodzic
commit
e1197986ab

+ 2 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -27,7 +27,7 @@ class PQStuckPointEditerController: PQBaseViewController {
     var isSynchroMusicInfoSuccess: Bool = false
     /// 当前所有的filter
     var filters: Array = Array<ImageProcessingOperation>.init()
-    // 选中所有素材的的总时长 已经不包括图片的时长
+    // 选中所有素材的的总时长 再进入编辑界面时已经不包括图片的时长 
     var selectedTotalDuration: Float64 = 0
     // 选择的总数
     var selectedDataCount: Int = 0
@@ -1465,6 +1465,7 @@ extension PQStuckPointEditerController {
                     if newMusicData?.speed != nil {
                         self?.stuckPointMusicData?.speed = newMusicData?.speed ?? 2
                     }
+                    
                     if (self?.stuckPointMusicData?.rhythmSdata.count ?? 0) > 0 && (((self?.selectedDataCount ?? 0) - (self?.selectedImageDataCount ?? 0)) > 0 || (self?.selectedImageDataCount ?? 0) > 0 || (self?.selectedTotalDuration ?? 0) > 0) {
 //                        self?.stuckPointMusicData?.endTime = (self?.stuckPointMusicData?.startTime ?? 0) + (self?.stuckPointMusicData?.stuckPointCuttingTime(videoCount: (self?.selectedDataCount ?? 0) - (self?.selectedImageDataCount ?? 0), imageCount: self?.selectedImageDataCount ?? 0, totalDuration: self?.selectedTotalDuration ?? 0) ?? 0)
                     }

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMaterialController.swift

@@ -164,7 +164,7 @@ public class PQStuckPointMaterialController: PQBaseViewController {
     lazy var photoMaterialVc: PQPhotoMaterialController = {
         let photoMaterialVc = PQPhotoMaterialController()
         photoMaterialVc.isShowMediaTag = false
-        photoMaterialVc.imageDuration = 0
+        photoMaterialVc.imageDuration = 1.5
         addChild(photoMaterialVc)
         view.insertSubview(photoMaterialVc.view, belowSubview: bottomRemindView)
 //        photoMaterialVc.updateFrame(newFrame: CGRect(x: 0, y: materialHeadView.frame.maxY + margin / 2, width: view.frame.width, height: view.frame.height - (materialHeadView.frame.maxY + margin + bottomRemindView.frame.height)))

+ 3 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicController.swift

@@ -237,7 +237,8 @@ class PQStuckPointMusicController: PQBaseViewController {
             editerVC.stuckPointMusicData = selectedMusicData
             editerVC.selectedDataCount = selectedDataCount
             editerVC.selectedImageDataCount = selectedImageDataCount
-            editerVC.selectedTotalDuration = selectedTotalDuration
+            //mdf by ak 进入编辑界面的时候去掉图片的时长
+            editerVC.selectedTotalDuration = selectedTotalDuration - (Double(selectedImageDataCount) * 1.5)
             editerVC.selectedPhotoData = selectedPhotoData
             editerVC.reCreateVideoData = reCreateVideoData
             editerVC.isReCreate = true
@@ -413,7 +414,7 @@ class PQStuckPointMusicController: PQBaseViewController {
             let editerVC: PQStuckPointEditerController = PQStuckPointEditerController()
             editerVC.selectedDataCount = selectedDataCount
             editerVC.selectedImageDataCount = selectedImageDataCount
-            editerVC.selectedTotalDuration = selectedTotalDuration
+            editerVC.selectedTotalDuration = selectedTotalDuration - (Double(selectedImageDataCount) * 1.5)
             editerVC.stuckPointMusicData = musicData
             editerVC.selectedPhotoData = selectedPhotoData
             navigationController?.pushViewController(editerVC, animated: true)