summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudioController.h
blob: 959bdc63a29f332b326558e39bd7f42dae776ae0 (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
//
//  HBAudioController.h
//  HandBrake
//
//  Created on 2010-08-24.
//

#import <Cocoa/Cocoa.h>
#import "hb.h"

extern NSString *keyAudioTrackIndex;
extern NSString *keyAudioTrackName;
extern NSString *keyAudioInputBitrate;
extern NSString *keyAudioInputSampleRate;
extern NSString *keyAudioInputCodec;
extern NSString *keyAudioInputCodecParam;
extern NSString *keyAudioInputChannelLayout;
extern NSString *HBMixdownChangedNotification;

@class HBAudio;

/**
 *  HBAudioController
 *
 *  Responds to HBContainerChangedNotification and HBTitleChangedNotification notifications.
 */
@interface HBAudioController : NSViewController

@property (nonatomic, readonly, retain) NSArray *masterTrackArray;
@property (nonatomic, readonly) NSDictionary *noneTrack;

@property(nonatomic, readwrite) BOOL allowAACPassCheck;
@property(nonatomic, readwrite) BOOL allowAC3PassCheck;
@property(nonatomic, readwrite) BOOL allowDTSHDPassCheck;
@property(nonatomic, readwrite) BOOL allowDTSPassCheck;
@property(nonatomic, readwrite) BOOL allowMP3PassCheck;

@property(nonatomic, readwrite, assign) NSString *audioEncoderFallback;
@property(nonatomic, readwrite) NSInteger audioEncoderFallbackTag;

- (void) enableUI: (BOOL) b;
- (void) setHBController: (id) aController;

- (void) prepareAudioForQueueFileJob: (NSMutableDictionary *) aDict;
- (void) prepareAudioForJobPreview: (hb_job_t *) aJob;
- (void) prepareAudioForPreset: (NSMutableArray *) anArray;
- (void) addTracksFromQueue: (NSMutableDictionary *) aQueue;
- (void) addTracksFromPreset: (NSMutableDictionary *) aPreset;

- (BOOL) anyCodecMatches: (int) aCodecValue;
- (void) settingTrackToNone: (HBAudio *) newNoneTrack;
- (void) switchingTrackFromNone: (HBAudio *) noLongerNoneTrack;

@end

@interface HBAudioController (KVC)

- (NSUInteger) countOfAudioArray;
- (HBAudio *) objectInAudioArrayAtIndex: (NSUInteger) index;
- (void) insertObject: (HBAudio *) audioObject inAudioArrayAtIndex: (NSUInteger) index;
- (void) removeObjectFromAudioArrayAtIndex: (NSUInteger) index;

@end