|
@@ -142,7 +142,7 @@ public class BFRecordItemModel: NSObject {
|
|
|
/// - parameter frames : 需要取的帧数
|
|
|
/// - parameter firstImagesCount : 获取首先N张连续视频帧后先返回给调用方使用作为缓冲
|
|
|
/// - parameter splitCompleteClosure : 回调
|
|
|
- func splitVideoFileUrlFps(frames: Int, firstImagesCount:Int = 0, splitCompleteClosure: @escaping ((Bool, [UIImage]) -> Void)) {
|
|
|
+ func splitVideoFileUrlFps(frames: Int, firstImagesCount:Int = 0, maxSize:CGSize = CGSize(width: 200, height: 200), splitCompleteClosure: @escaping ((Bool, [UIImage]) -> Void)) {
|
|
|
guard let urlAsset = videoAsset, urlAsset.duration.seconds > 0 else {
|
|
|
return
|
|
|
}
|
|
@@ -165,6 +165,7 @@ public class BFRecordItemModel: NSObject {
|
|
|
imgGenerator.requestedTimeToleranceBefore = CMTime.zero
|
|
|
imgGenerator.requestedTimeToleranceAfter = CMTime.zero
|
|
|
imgGenerator.appliesPreferredTrackTransform = true
|
|
|
+ imgGenerator.maximumSize = CGSize(width: 200, height: 200)
|
|
|
let timesCount = times.count
|
|
|
var cocu = 0
|
|
|
// 获取每一帧的图片
|