|
|
@@ -28,12 +28,11 @@ public class BFRecordItemModel: NSObject {
|
|
|
var coverPath: String?
|
|
|
var materialDuraion: CMTime = .zero
|
|
|
var fetchCoverImgCallBack: ((UIImage) -> Void)?
|
|
|
-
|
|
|
var fetchPlayItemCallBack: ((BFRecordItemModel?) -> Void)?
|
|
|
var dealedDurationRanges = [SplitRecordRange]()
|
|
|
public var voiceStickers = [PQVoiceModel]()
|
|
|
public var videoStickers = [PQEditVisionTrackMaterialsModel]()
|
|
|
- public var imageStickers = [PQEditVisionTrackMaterialsModel]()
|
|
|
+
|
|
|
public var titleStickers = [PQEditSubTitleModel]()
|
|
|
|
|
|
var events = [WithDrawModel]()
|
|
|
@@ -49,6 +48,40 @@ public class BFRecordItemModel: NSObject {
|
|
|
public var height = 0
|
|
|
public var videoDegress: UInt = 0
|
|
|
|
|
|
+ public override func mutableCopy() -> Any {
|
|
|
+ let new = BFRecordItemModel()
|
|
|
+ new.localPath = self.localPath
|
|
|
+ new.coverPath = self.coverPath
|
|
|
+ new.materialDuraion = self.materialDuraion
|
|
|
+ new.fetchCoverImgCallBack = self.fetchCoverImgCallBack
|
|
|
+ new.fetchPlayItemCallBack = self.fetchPlayItemCallBack
|
|
|
+
|
|
|
+
|
|
|
+ self.voiceStickers.forEach { mod in
|
|
|
+ new.voiceStickers.append(mod.mutableCopy() as! PQVoiceModel)
|
|
|
+ }
|
|
|
+ self.videoStickers.forEach { mod in
|
|
|
+ new.videoStickers.append(mod.mutableCopy() as! PQEditVisionTrackMaterialsModel)
|
|
|
+ }
|
|
|
+ self.titleStickers.forEach { mod in
|
|
|
+ new.titleStickers.append(mod.mutableCopy() as! PQEditSubTitleModel)
|
|
|
+ }
|
|
|
+ new.thumbImgs.append(contentsOf: self.thumbImgs)
|
|
|
+
|
|
|
+ new.events = self.events
|
|
|
+ new.coverImg = self.coverImg
|
|
|
+ new.playItem = self.playItem
|
|
|
+ new.videoAsset = self.videoAsset
|
|
|
+ new.mediaType = self.mediaType
|
|
|
+ new.progress = self.progress
|
|
|
+ new.index = self.index
|
|
|
+ new.width = self.width
|
|
|
+ new.height = self.height
|
|
|
+ new.videoDegress = self.videoDegress
|
|
|
+
|
|
|
+ return new
|
|
|
+ }
|
|
|
+
|
|
|
func initOriginData(phasset: PHAsset) {
|
|
|
width = phasset.pixelWidth
|
|
|
height = phasset.pixelHeight
|