summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideo+UIAdditions.h
blob: 2360969161ca7ee65ddca389955deb12de7ea5c4 (plain)
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
/*  HBVideo+UIAdditions.h $

 This file is part of the HandBrake source code.
 Homepage: <http://handbrake.fr/>.
 It may be used under the terms of the GNU General Public License. */

#import <Foundation/Foundation.h>
#import "HBVideo.h"

@interface HBVideo (UIAdditions)

/**
 *  Arrays of possible options for the video properties.
 */
@property (nonatomic, readonly) NSArray *encoders;
@property (nonatomic, readonly) NSArray *frameRates;

@property (nonatomic, readonly) NSArray *presets;
@property (nonatomic, readonly) NSArray *tunes;
@property (nonatomic, readonly) NSArray *profiles;
@property (nonatomic, readonly) NSArray *levels;

@property (nonatomic, readonly) BOOL fastDecodeSupported;
@property (nonatomic, readonly) BOOL twoPassSupported;
@property (nonatomic, readonly) BOOL turboTwoPassSupported;

@property (nonatomic, readonly) NSString *unparseOptions;

@property (nonatomic, readonly) NSString *constantQualityLabel;

@property (nonatomic, readonly) double qualityMinValue;
@property (nonatomic, readonly) double qualityMaxValue;
@property (nonatomic, readonly) BOOL isConstantQualitySupported;

@end

/**
 *  A series of value trasformers to bridge the libhb enums
 *  to the textual rapresentations used in the interface.
 */
@interface HBVideoEncoderTransformer : NSValueTransformer
@end

@interface HBFrameRateTransformer : NSValueTransformer
@end

@interface HBPresetsTransformer : NSValueTransformer
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithEncoder:(int)encoder NS_DESIGNATED_INITIALIZER;
@end

@interface HBQualityTransformer : NSValueTransformer
- (instancetype)initWithReversedDirection:(BOOL)reverse min:(double)min max:(double)max NS_DESIGNATED_INITIALIZER;
@end

@interface HBVideo (EncoderAdditions)

- (BOOL)isUnparsedSupported:(int)encoder;
- (BOOL)isPresetSystemSupported:(int)encoder;
- (BOOL)isSimpleOptionsPanelSupported:(int)encoder;
- (BOOL)isOldAdvancedPanelSupported:(int)encoder;
- (void)qualityLimitsForEncoder:(int)encoder low:(float *)low high:(float *)high granularity:(float *)granularity direction:(int *)direction;

@end