summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudio.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-01-31 17:12:11 +0000
committerritsuka <[email protected]>2015-01-31 17:12:11 +0000
commitc81e2df474f6181b19c20423e454c2f1067d12e5 (patch)
treece48f945796827b76de9d261247ca4c2130c32e1 /macosx/HBAudio.m
parent32e65ab4d0c0dd32da51322aaa2b170fcf23113d (diff)
MacGui: add a HBAudioTrackDataSource protocol to simplify HBAudio interface.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6844 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r--macosx/HBAudio.m15
1 files changed, 10 insertions, 5 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m
index df09a85be..226defe9e 100644
--- a/macosx/HBAudio.m
+++ b/macosx/HBAudio.m
@@ -15,7 +15,12 @@
#include "hb.h"
-@interface HBAudio ()
+NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
+
+@interface HBAudio () <HBAudioTrackDataSource>
+
+@property (nonatomic, readonly) NSDictionary *noneTrack;
+@property (nonatomic, readonly) NSArray *masterTrackArray; // the master list of audio tracks from the title
@property (nonatomic, readwrite) int container; // initially is the default HB_MUX_MP4
@@ -101,7 +106,7 @@
{
BOOL fallenBack = NO;
HBAudioTrack *newAudio = [[HBAudioTrack alloc] init];
- [newAudio setController: self];
+ [newAudio setDataSource:self];
[self insertObject: newAudio inTracksAtIndex: [self countOfTracks]];
[newAudio setVideoContainerTag:@(self.container)];
[newAudio setTrackFromIndex: (int)trackIndex];
@@ -283,7 +288,7 @@
- (void)addNewAudioTrack
{
HBAudioTrack *newAudio = [[HBAudioTrack alloc] init];
- [newAudio setController: self];
+ [newAudio setDataSource:self];
[self insertObject: newAudio inTracksAtIndex: [self countOfTracks]];
[newAudio setVideoContainerTag:@(self.container)];
[newAudio setTrack: self.noneTrack];
@@ -368,7 +373,7 @@
if (idx < _tracks.count)
{
HBAudioTrack *trackCopy = [obj copy];
- trackCopy.controller = copy;
+ trackCopy.dataSource = copy;
[copy->_tracks addObject:[trackCopy autorelease]];
}
}];
@@ -406,7 +411,7 @@
for (HBAudioTrack *track in _tracks)
{
- track.controller = self;
+ track.dataSource = self;
}
decodeObject(_defaults);