-
Notifications
You must be signed in to change notification settings - Fork 1
/
MLVProcessorProtocol.h
70 lines (57 loc) · 4.07 KB
/
MLVProcessorProtocol.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
68
69
70
/*
* Copyright (C) 2017 Martin Hering
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MLVProcessorProtocol_h
#define MLVProcessorProtocol_h
#define kMLVAttributeKeyManufacturer @"Manufacturer" // NSString
#define kMLVAttributeKeyCamera @"Camera" // NSString
#define kMLVAttributeKeyLens @"Lens" // NSString
#define kMLVAttributeKeyOriginalImageSize @"Original Image Size" // NSString(NSSize)
#define kMLVAttributeKeyScaledImageSize @"Scaled Image Size" // NSString(NSSize)
#define kMLVAttributeKeyBitsPerSample @"Bits Per Sample" // NSNumber
#define kMLVAttributeKeyExposureTime @"Exposure Time" // NSNumber: 1000000/x sec
#define kMLVAttributeKeyAperture @"Aperture" // NSNumber: y/100
#define kMLVAttributeKeyISO @"ISO" // NSNumber
#define kMLVAttributeKeyFocalLength @"Focal Lengh" // NSNumber
#define kMLVAttributeKeyCompression @"Compression" // NSString
#define kMLVAttributeKeyOriginalDate @"Original Date" // NSDate
#define kMLVAttributeKeyFileSize @"File Size" // NSNumber
#define kMLVAttributeKeyAudioSampleRate @"Audio Sample Rate" // NSNumber
#define kMLVAttributeKeyAudioBitsPerSample @"Audio Bits Per Sample" // NSNumber
#define kMLVAttributeKeyAudioChannels @"Audio Channels" // NSNumber
#define kMLVAttributeKeyDuration @"Duration" // NSNumber
#define kMLVAttributeKeyFrameTime @"Frame Time" // NSValue: CMTime
#define kMLVAttributeKeyVersion @"Version" // NSNumber
#define kMLVAttributeKeyVideoBlocksCount @"Video Blocks Count" // NSNumber
#define kMLVAttributeKeyAudioBlocksCount @"Audio Blocks Count" // NSNumber
typedef NS_ENUM(NSInteger, MLVProcessorOptions) {
kMLVProcessorOptionsNone = 0,
kMLVProcessorOptionsFixFocusPixels = 1 << 0,
kMLVProcessorOptionsFixDeadPixels = 1 << 1,
kMLVProcessorOptionsFixVerticalBanding = 1 << 2,
kMLVProcessorOptionsConvertTo14Bit = 1 << 3,
kMLVProcessorOptionsCreateHighlightsMap = 1 << 4,
kMLVProcessorOptionsOmitDngThumbnail = 1 << 5
};
@protocol MLVProcessorProtocol
- (void) openFileWithURL:(NSURL*)url withReply:(void (^)(NSString *fileId, NSDictionary<NSString*, id>* attributes, NSData* archiveData, NSError* error))reply;
- (void) requestReadProgressForFileWithURL:(NSURL*)url withReply:(void (^)(float progress))reply;
- (void) openFileWithArchiveData:(NSData*)data withReply:(void (^)(NSString *fileId, NSDictionary<NSString*, id>* attributes, NSError* error))reply;
- (void) requestBlockIndexesAtTime:(NSTimeInterval)time forFileWithId:(NSString*)fileId withReply:(void (^)(NSUInteger videoBlockIndex, NSUInteger audioBlockIndex, NSError* error))reply;
- (void) readVideoFrameAtIndex:(NSInteger)frameIndex fileId:(NSString*)fileId options:(MLVProcessorOptions)options withReply:(void (^)(NSData* dngData, NSData* highlightMap, NSDictionary<NSString*, id>* avSettings, NSError* error))reply;
- (void) readAudioFrameAtIndex:(NSInteger)frameIndex fileId:(NSString*)fileId options:(MLVProcessorOptions)options withReply:(void (^)(NSData* audioData, NSDictionary<NSString*, id>* avSettings, NSError* error))reply;
- (void) closeFileWithId:(NSString*)fileId withReply:(void (^)(NSError* error))reply;
@end
#endif /* MLVProcessorProtocol_h */