1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-11 17:09:46 +01:00
Telegram/Telegraph/TGMediaPickerAsset.h

44 lines
1.4 KiB
C
Raw Normal View History

2014-07-10 16:11:09 +02:00
#import <Foundation/Foundation.h>
2015-10-01 18:19:52 +02:00
@class PHAsset;
2014-07-10 16:11:09 +02:00
@class ALAsset;
2015-10-01 18:19:52 +02:00
typedef enum {
TGMediaPickerAssetAnyType,
TGMediaPickerAssetPhotoType,
TGMediaPickerAssetVideoType
} TGMediaPickerAssetType;
typedef enum {
TGMediaPickerAssetSubtypeNone = 0,
TGMediaPickerAssetSubtypePhotoPanorama = (1UL << 0),
TGMediaPickerAssetSubtypePhotoHDR = (1UL << 1),
TGMediaPickerAssetSubtypeVideoStreamed = (1UL << 16),
TGMediaPickerAssetSubtypeVideoHighFrameRate = (1UL << 17),
TGMediaPickerAssetSubtypeVideoTimelapse = (1UL << 18)
} TGMediaPickerAssetSubtype;
2014-07-10 16:11:09 +02:00
@interface TGMediaPickerAsset : NSObject
2015-10-01 18:19:52 +02:00
@property (nonatomic, readonly) NSString *persistentId;
@property (nonatomic, readonly) NSURL *url;
@property (nonatomic, readonly) CGSize dimensions;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, readonly) bool isVideo;
@property (nonatomic, readonly) NSTimeInterval videoDuration;
@property (nonatomic, readonly) NSTimeInterval actualVideoDuration;
@property (nonatomic, readonly) bool representsBurst;
@property (nonatomic, readonly) TGMediaPickerAssetType type;
@property (nonatomic, readonly) TGMediaPickerAssetSubtype subtypes;
@property (nonatomic, readonly) PHAsset *backingAsset;
@property (nonatomic, readonly) ALAsset *backingLegacyAsset;
2014-07-10 16:11:09 +02:00
2015-10-01 18:19:52 +02:00
- (instancetype)initWithPHAsset:(PHAsset *)asset;
- (instancetype)initWithALAsset:(ALAsset *)asset;
2014-07-10 16:11:09 +02:00
2015-10-01 18:19:52 +02:00
- (NSString *)uniqueId;
2014-07-10 16:11:09 +02:00
@end