diff options
author | ritsuka <[email protected]> | 2015-01-13 08:08:04 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-13 08:08:04 +0000 |
commit | 677231f07d765e79afdc76e7741bb9e03bde1142 (patch) | |
tree | b98775bb09649710c9b80b6370c8d261ce778cf9 /macosx/Controller.m | |
parent | 40edf3c9bce9f91fa3b5d8f422ad5df1e8ad3eb6 (diff) |
MacGui: Move the audio/subtitles selection logic out of the view controllers. Now it's possible to create a HBJob and apply a preset to without the UI classes help.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6741 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r-- | macosx/Controller.m | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 8306c2eda..ebbf968fc 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -326,8 +326,8 @@ fPreviewController.job = job; fVideoController.job = job; - fAudioController.job = job; - fSubtitlesViewController.job = job; + fAudioController.audio = job.audio; + fSubtitlesViewController.subtitles = job.subtitles; fChapterTitlesController.job = job; if (job) @@ -791,8 +791,8 @@ if (p.job_cur == 1 && p.job_count > 1) { HBJob *queueJob = QueueFileArray[currentQueueEncodeIndex]; - if (queueJob.subtitlesTracks.count && - [[queueJob.subtitlesTracks firstObject][keySubTrackIndex] intValue] == -1) + if (queueJob.subtitles.tracks.count && + [queueJob.subtitles.tracks.firstObject[keySubTrackIndex] intValue] == -1) { pass_desc = NSLocalizedString(@"(subtitle scan)", @""); } @@ -2521,7 +2521,7 @@ static void queueFSEventStreamCallback( NSString *extension = @"mp4"; - BOOL anyCodecAC3 = [fAudioController anyCodecMatches: HB_ACODEC_AC3] || [fAudioController anyCodecMatches: HB_ACODEC_AC3_PASS]; + BOOL anyCodecAC3 = [self.job.audio anyCodecMatches:HB_ACODEC_AC3] || [self.job.audio anyCodecMatches:HB_ACODEC_AC3_PASS]; // Chapter markers are enabled if the checkbox is ticked and we are doing p2p or we have > 1 chapter BOOL chapterMarkers = (self.job.chaptersEnabled) && (self.job.range.type != HBRangeTypeChapters || @@ -2668,12 +2668,6 @@ static void queueFSEventStreamCallback( // Apply the preset to the current job [self.job applyPreset:preset]; - // Have to apply the presets the audio and subtitles controllers too - // because they haven't been moved to HBJob yer. - NSDictionary *chosenPreset = preset.content; - [fAudioController applySettingsFromPreset: chosenPreset]; - [fSubtitlesViewController applySettingsFromPreset:chosenPreset]; - // If Auto Naming is on. We create an output filename of dvd name - title number if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultAutoNaming"]) { |