diff options
author | Rodeo <[email protected]> | 2012-05-09 12:23:43 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-05-09 12:23:43 +0000 |
commit | 284e8aeba3178324c147426c4fcf8695c6844166 (patch) | |
tree | 5f5ffa388107ae96f48e6229c4fe186e47117bb9 | |
parent | 662355ae07f93f0a84ce91f1519561d288c3b870 (diff) |
MacGui: apply Auto Passthru settings even if the widgets are hidden.
If you don't do this, then presets that use these will not function as advertised (see revision 4640).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4653 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.m | 110 |
1 files changed, 35 insertions, 75 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 9d7830059..30e8c8e4d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2433,32 +2433,15 @@ fWorkingCount = 0; [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController grayscale]] forKey:@"VideoGrayScale"]; /* Auto Passthru */ - if ([fAudioAutoPassthruBox isHidden]) - { - // every passthru is allowed, fallback is AC3 - [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAACPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAC3Pass"]; - [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSHDPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowMP3Pass"]; - // just in case we need it for display purposes - [queueFileJob setObject:@"AC3 (ffmpeg)" forKey: @"AudioEncoderFallback"]; - // actual fallback encoder - [queueFileJob setObject:[NSNumber numberWithInt:HB_ACODEC_AC3] forKey: @"JobAudioEncoderFallback"]; - - } - else - { - [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"]; - [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"]; - [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"]; - // just in case we need it for display purposes - [queueFileJob setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"]; - // actual fallback encoder - [queueFileJob setObject:[NSNumber numberWithInt:[[fAudioFallbackPopUp selectedItem] tag]] forKey: @"JobAudioEncoderFallback"]; - } + [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"]; + [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"]; + [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"]; + [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"]; + [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"]; + // just in case we need it for display purposes + [queueFileJob setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"]; + // actual fallback encoder + [queueFileJob setObject:[NSNumber numberWithInt:[[fAudioFallbackPopUp selectedItem] tag]] forKey: @"JobAudioEncoderFallback"]; /* Audio */ [self writeToActivityLog: "createQueueFileItem: Getting Audio from prepareAudioForQueueFileJob ..."]; @@ -3263,37 +3246,28 @@ bool one_burned = FALSE; /* Auto Passthru */ - if ([fAudioAutoPassthruBox isHidden]) + job->acodec_copy_mask = 0; + if ([fAudioAllowAACPassCheck state] == NSOnState) { - // every passthru is allowed, fallback is AC3 - job->acodec_copy_mask = HB_ACODEC_PASS_MASK; - job->acodec_fallback = HB_ACODEC_AC3; + job->acodec_copy_mask |= HB_ACODEC_FFAAC; } - else + if ([fAudioAllowAC3PassCheck state] == NSOnState) { - job->acodec_copy_mask = 0; - if ([fAudioAllowAACPassCheck state] == NSOnState) - { - job->acodec_copy_mask |= HB_ACODEC_FFAAC; - } - if ([fAudioAllowAC3PassCheck state] == NSOnState) - { - job->acodec_copy_mask |= HB_ACODEC_AC3; - } - if ([fAudioAllowDTSHDPassCheck state] == NSOnState) - { - job->acodec_copy_mask |= HB_ACODEC_DCA_HD; - } - if ([fAudioAllowDTSPassCheck state] == NSOnState) - { - job->acodec_copy_mask |= HB_ACODEC_DCA; - } - if ([fAudioAllowMP3PassCheck state] == NSOnState) - { - job->acodec_copy_mask |= HB_ACODEC_MP3; - } - job->acodec_fallback = [[fAudioFallbackPopUp selectedItem] tag]; + job->acodec_copy_mask |= HB_ACODEC_AC3; + } + if ([fAudioAllowDTSHDPassCheck state] == NSOnState) + { + job->acodec_copy_mask |= HB_ACODEC_DCA_HD; + } + if ([fAudioAllowDTSPassCheck state] == NSOnState) + { + job->acodec_copy_mask |= HB_ACODEC_DCA; } + if ([fAudioAllowMP3PassCheck state] == NSOnState) + { + job->acodec_copy_mask |= HB_ACODEC_MP3; + } + job->acodec_fallback = [[fAudioFallbackPopUp selectedItem] tag]; /* Audio tracks and mixdowns */ [fAudioDelegate prepareAudioForJob: job]; @@ -5766,9 +5740,8 @@ return YES; /* Turbo 1st pass for 2 Pass Encoding */ [fVidTurboPassCheck setState:[[chosenPreset objectForKey:@"VideoTurboTwoPass"] intValue]]; - /* Auto Passthru */ - /* If the preset has Auto Passthru fields, use them; - * else assume every passthru is allowed and the fallback is AC3 */ + /* Auto Passthru: if the preset has Auto Passthru fields, use them. + * Otherwise assume every passthru is allowed and the fallback is AC3 */ id tempObject; if ((tempObject = [chosenPreset objectForKey:@"AudioAllowAACPass"]) != nil) { @@ -6342,25 +6315,12 @@ return YES; [preset setObject:[NSNumber numberWithInt:[fPictureController grayscale]] forKey:@"VideoGrayScale"]; /* Auto Pasthru */ - if ([fAudioAutoPassthruBox isHidden]) - { - // every passthru is allowed, fallback is AC3 - [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAACPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAC3Pass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSHDPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowMP3Pass"]; - [preset setObject:@"AC3 (ffmpeg)" forKey: @"AudioEncoderFallback"]; - } - else - { - [preset setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"]; - [preset setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"]; - [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"]; - [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"]; - [preset setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"]; - [preset setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"]; - } + [preset setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"]; + [preset setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"]; + [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"]; + [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"]; + [preset setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"]; + [preset setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"]; /* Audio */ NSMutableArray *audioListArray = [[NSMutableArray alloc] init]; |