From c81e2df474f6181b19c20423e454c2f1067d12e5 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sat, 31 Jan 2015 17:12:11 +0000 Subject: MacGui: add a HBAudioTrackDataSource protocol to simplify HBAudio interface. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6844 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBAudio.m | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'macosx/HBAudio.m') 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 () + +@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); -- cgit v1.2.3