forked from rFlex/SCRecorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCRecordSessionSegment.h
67 lines (53 loc) · 1.35 KB
/
SCRecordSessionSegment.h
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
66
67
//
// SCRecordSessionSegment.h
// SCRecorder
//
// Created by Simon CORSIN on 10/03/15.
// Copyright (c) 2015 rFlex. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <UIKit/UIKit.h>
@interface SCRecordSessionSegment : NSObject
/**
The url containing the segment data
*/
@property (strong, nonatomic) NSURL *url;
/**
The AVAsset created from the url.
*/
@property (readonly, nonatomic) AVAsset *asset;
/**
The duration of this segment
*/
@property (readonly, nonatomic) CMTime duration;
/**
The thumbnail that represents this segment
*/
@property (readonly, nonatomic) UIImage *thumbnail;
/**
The lastImage of this segment. This can be used for implement
features like Vine's ghost mode.
*/
@property (readonly, nonatomic) UIImage *lastImage;
/**
The average frameRate of this segment
*/
@property (readonly, nonatomic) float frameRate;
/**
The custom info dictionary.
*/
@property (readonly, nonatomic) NSDictionary *info;
/**
Initialize with an URL and an info dictionary
*/
- (instancetype)initWithURL:(NSURL *)url info:(NSDictionary *)info;
/**
Delete the file at the url. This will make the segment unusable.
*/
- (void)deleteFile;
/**
Create and init a segment using an URL and an info dictionary
*/
+ (SCRecordSessionSegment *)segmentWithURL:(NSURL *)url info:(NSDictionary *)info;
@end