summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudioTrack.h
blob: e1333678df1d040bdb2effc67920b815f0d5dc3b (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
65
66
67
68
69
70
71
72
73
74
/*  HBAudioTrack.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>

@class HBAudio;
@protocol HBAudioTrackDataSource;
@protocol HBAudioTrackDelegate;

NS_ASSUME_NONNULL_BEGIN

/**
 *  Audio track dicts keys.
 */
extern NSString *keyAudioTrackIndex;
extern NSString *keyAudioTrackName;
extern NSString *keyAudioInputBitrate;
extern NSString *keyAudioInputSampleRate;
extern NSString *keyAudioInputCodec;
extern NSString *keyAudioInputCodecParam;
extern NSString *keyAudioInputChannelLayout;
extern NSString *keyAudioTrackLanguageIsoCode;

extern NSString *keyAudioCodecName;
extern NSString *keyAudioSampleRateName;
extern NSString *keyAudioBitrateName;
extern NSString *keyAudioMixdownName;
extern NSString *keyAudioCodec;
extern NSString *keyAudioMixdown;
extern NSString *keyAudioSamplerate;
extern NSString *keyAudioBitrate;

@interface HBAudioTrack : NSObject <NSSecureCoding, NSCopying>

@property (nonatomic, strong) NSDictionary *track;
@property (nonatomic, strong, nullable) NSDictionary *codec;
@property (nonatomic, strong) NSDictionary *mixdown;
@property (nonatomic, strong) NSDictionary *sampleRate;
@property (nonatomic, strong) NSDictionary *bitRate;
@property (nonatomic, strong) NSNumber *drc;
@property (nonatomic, strong) NSNumber *gain;
@property (nonatomic, strong) NSNumber *videoContainerTag;
@property (nonatomic, weak, nullable) id<HBAudioTrackDataSource> dataSource;
@property (nonatomic, weak, nullable) id<HBAudioTrackDelegate> delegate;

@property (nonatomic, strong) NSMutableArray *codecs;
@property (nonatomic, strong) NSMutableArray *mixdowns;
@property (nonatomic, readonly) NSArray *sampleRates;
@property (nonatomic, strong) NSArray *bitRates;
@property (nonatomic, readonly) BOOL enabled;

- (void) setTrackFromIndex: (int) aValue;
- (BOOL) setCodecFromName: (NSString *) aValue;
- (void) setMixdownFromName: (NSString *) aValue;
- (void) setSampleRateFromName: (NSString *) aValue;
- (void) setBitRateFromName: (NSString *) aValue;

@end

@protocol HBAudioTrackDataSource <NSObject>
- (NSDictionary *)noneTrack;
- (NSArray *)masterTrackArray;
@end

@protocol HBAudioTrackDelegate <NSObject>
- (void)settingTrackToNone:(HBAudioTrack *)newNoneTrack;
- (void)switchingTrackFromNone:(HBAudioTrack *)noLongerNoneTrack;
- (void)mixdownChanged;
@end

NS_ASSUME_NONNULL_END