diff options
author | Rodeo <[email protected]> | 2012-05-09 12:25:43 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-05-09 12:25:43 +0000 |
commit | daa1171da6f8b8ddcd510fe840389b0a1da71391 (patch) | |
tree | f5eb85645f47695e8ee90d1c12d17bdc845be7a6 | |
parent | 8c69ff06cd90175f37de1453cf2e8a45424942b6 (diff) |
Bugfix branch: MacGui, apply Auto Passthru settings even if the widgets are hidden.
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4654 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 f0d58f9a9..ec0c8f32c 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 ..."]; @@ -3285,37 +3268,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]; @@ -5789,9 +5763,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) { @@ -6365,25 +6338,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]; |