PLShortVideoAsset.h
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// PLShortVideoAsset.h
// PLShortVideoKit
//
// Created by 冯文秀 on 2017/9/26.
// Copyright © 2017年 Pili Engineering, Qiniu Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import "PLSTypeDefines.h"
@interface PLShortVideoAsset : NSObject
/**
@brief 实例初始化方法
@since v1.6.0
*/
- (instancetype _Nullable )initWithURL:(NSURL *_Nullable)url;
/**
@brief 实例初始化方法
@since v1.6.0
*/
- (instancetype _Nullable )initWithAsset:(AVAsset *_Nullable)asset;
/**
@brief 返回倍数处理后的视频
*
* @param timeRange 倍数处理时间段
*
* @param rateType 倍数处理的类型
*
@since v1.8.0
*/
- (AVAsset *_Nonnull)scaleTimeRange:(CMTimeRange)timeRange toRateType:(PLSVideoRecoderRateType)rateType;
/**
@brief 返回倍数处理后的视频
*
* @param sourceAsset 需要倍数处理的视频,为 nil 时,默认使用 PLShortVideoAsset 初始化传入的视频数据
*
* @param timeRange 倍数处理时间段
*
* @param rateType 倍数处理的类型
*
@since v1.6.0
*/
- (AVAsset *_Nonnull)scaleAsset:(AVAsset *_Nullable)sourceAsset timeRange:(CMTimeRange)timeRange rateType:(PLSVideoRecoderRateType)rateType __deprecated_msg("Method deprecated in v1.8.0. Use `scaleTimeRange: toRateType:`");
/**
@brief 返回拼接好的视频
*
* @param assetArray AVAsset 数组
*
@since v1.6.0
*/
- (AVAsset *_Nonnull)appendAssetArray:(NSArray<AVAsset *> *_Nonnull)assetArray;
@end