diff options
author | dynaflash <[email protected]> | 2010-09-15 17:49:16 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-09-15 17:49:16 +0000 |
commit | b8353118c5cbd314514a6f9bcd2f566a0be0cd36 (patch) | |
tree | 6bf14c4879b5166f7b2976fcd67d6b0083c1ea52 /macosx/HBAudioController.h | |
parent | aa377f1ebae6ebb070f2713bb34700eed422186e (diff) |
MacGui: Audio ... Allow more than 4 audio tracks.
- Patch courtesy of circleone ... Thanks!
- Use a NSTableView to dynamically add/delete audio tracks ala the Subtitle tab.
- Sets a 24 track limit until someone tests more than 24 tracks (the libhb 8 track limit was removed as per http://trac.handbrake.fr/changeset/3531).
- Replaces the old static 4 tracks to a dynamic array.
- Moves macgui audio handling to a separate class.
Known caveats:
- Borks queue editing which needs a revamp anyway.
- Queue window display needs to be adjusted to show more than 4 tracks appropriately. Again, its cosmetic and is not a show stopper.
- There may be other possible unknown side effects even though tested on all presets. That said, I feel it needs to get in so that we can get feedback from nightlies.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3532 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudioController.h')
-rw-r--r-- | macosx/HBAudioController.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/macosx/HBAudioController.h b/macosx/HBAudioController.h new file mode 100644 index 000000000..b6a016a5a --- /dev/null +++ b/macosx/HBAudioController.h @@ -0,0 +1,55 @@ +// +// 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 *keyAudioInputChannelLayout; +extern NSString *HBMixdownChangedNotification; + +@class HBAudio; + +@interface HBAudioController : NSObject + + { + id myController; + NSMutableArray *audioArray; // the configured audio information + NSMutableArray *masterTrackArray; // the master list of audio tracks from the title + NSDictionary *noneTrack; // this represents no audio track selection + NSNumber *videoContainerTag; // initially is the default HB_MUX_MP4 + } + +@property (nonatomic, readonly) NSArray *masterTrackArray; +@property (nonatomic, readonly) NSDictionary *noneTrack; +@property (nonatomic, retain) NSNumber *videoContainerTag; + +- (void) setHBController: (id) aController; +- (void) prepareAudioForQueueFileJob: (NSMutableDictionary *) aDict; +- (void) prepareAudioForJob: (hb_job_t *) aJob; +- (void) prepareAudioForPreset: (NSMutableArray *) anArray; +- (void) addTracksFromQueue: (NSMutableDictionary *) aQueue; +- (void) addTracksFromPreset: (NSMutableDictionary *) aPreset; +- (BOOL) anyCodecMatches: (int) aCodecValue; +- (void) addNewAudioTrack; +- (void) settingTrackToNone: (HBAudio *) newNoneTrack; +- (void) switchingTrackFromNone: (HBAudio *) noLongerNoneTrack; + +@end + +@interface HBAudioController (KVC) + +- (unsigned int) countOfAudioArray; +- (HBAudio *) objectInAudioArrayAtIndex: (unsigned int) index; +- (void) insertObject: (HBAudio *) audioObject inAudioArrayAtIndex: (unsigned int) index; +- (void) removeObjectFromAudioArrayAtIndex: (unsigned int) index; + +@end |