From 800ac294c1ecf92d4298769e7335cd118f8f21c4 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Tue, 22 Jan 2008 15:33:02 +0000 Subject: MacGui: Make Legacy iPod presets truly backwards compatible - Preset code now adds "level=30" to the advanced options string if the deprecated "x264 (h.264 iPod)" is detected as encoder in a legacy preset. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1221 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.mm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 4fca24a71..76a40e677 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3346,7 +3346,10 @@ if (item == nil) /* Codecs */ [fDstCodecsPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"FileCodecs"]]]; [self codecsPopUpChanged: NULL]; + /* Video encoder */ + /* We set the advanced opt string here if applicable*/ + [fAdvancedOptions setOptions: [NSString stringWithFormat:[chosenPreset valueForKey:@"x264Option"]]]; /* We use a conditional to account for the new x264 encoder dropdown as well as presets made using legacy x264 settings*/ if ([[NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]] isEqualToString: @"x264 (h.264 Main)"] || [[NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]] isEqualToString: @"x264 (h.264 iPod)"]) { @@ -3355,10 +3358,13 @@ if (item == nil) if ([[NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]] isEqualToString: @"x264 (h.264 iPod)"]) { [fDstMp4iPodFileCheck setState:NSOnState]; + /* We also need to add "level=30:" to the advanced opts string to set the correct level for the iPod when + encountering a legacy preset as it used to be handled separately from the opt string*/ + [fAdvancedOptions setOptions: [NSString stringWithFormat:[@"level=30:" stringByAppendingString:[fAdvancedOptions optionsString]]]]; } else { - [fDstMp4iPodFileCheck setState:NSOffState]; + [fDstMp4iPodFileCheck setState:NSOffState]; } } else @@ -3366,11 +3372,6 @@ if (item == nil) [fVidEncoderPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]]]; } - - /* We can show the preset options here in the gui if we want to - so we check to see it the user has specified it in the prefs */ - [fAdvancedOptions setOptions: [NSString stringWithFormat:[chosenPreset valueForKey:@"x264Option"]]]; - /* Lets run through the following functions to get variables set there */ [self encoderPopUpChanged: NULL]; -- cgit v1.2.3