summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorRodeo <[email protected]>2011-08-18 23:04:02 +0000
committerRodeo <[email protected]>2011-08-18 23:04:02 +0000
commitebc41002e0a8eef6e1dbf3f1c962a9c630b54179 (patch)
tree6a47d1990da73ff08704cd490a2e93443c6c9377 /macosx
parentc940d50b267c06d669dd068ece3b0baa5309a320 (diff)
MacGui: Make AAC and MP3 passthru fall back to the AAC and MP3 encoders, respectively (instead of dropping them like DTS/DTS-HD).
Drop the never-used AC3PassthruDefaultsToAC3 preference (it defaulted to true and was never wired to the GUI). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4186 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBAudioController.m26
-rw-r--r--macosx/HBPreferencesController.m1
2 files changed, 24 insertions, 3 deletions
diff --git a/macosx/HBAudioController.m b/macosx/HBAudioController.m
index 68116a401..16538c2ff 100644
--- a/macosx/HBAudioController.m
+++ b/macosx/HBAudioController.m
@@ -293,12 +293,15 @@ NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
[newAudio setTrackFromIndex: trackIndex];
key = [dict objectForKey: @"AudioEncoder"];
+
+ // map faac to ca_aac for built-in presets (can be disabled in preferences)
if (0 == aType &&
[[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] &&
[key isEqualToString: @"AAC (faac)"])
{
[dict setObject: @"AAC (CoreAudio)" forKey: @"AudioEncoder"];
}
+
// Auto Passthru not yet implemented - fallback to AC3 Passthru as it is
// compatible with all source codecs (via the AC3 encoder fallback)
if ([key isEqualToString: @"Auto Passthru"])
@@ -306,8 +309,17 @@ NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
[dict setObject: @"AC3 Passthru" forKey: @"AudioEncoder"];
key = @"AC3 Passthru";
}
- if ([[NSUserDefaults standardUserDefaults] boolForKey: @"AC3PassthruDefaultsToAC3"] &&
- [key isEqualToString: @"AC3 Passthru"])
+
+ // passthru fallbacks
+ if ([key isEqualToString: @"AAC Passthru"])
+ {
+ if (![newAudio setCodecFromName: key])
+ {
+ [dict setObject: @"AAC (CoreAudio)" forKey: @"AudioEncoder"];
+ fallenBack = YES;
+ }
+ }
+ else if ([key isEqualToString: @"AC3 Passthru"])
{
if (![newAudio setCodecFromName: key])
{
@@ -315,6 +327,16 @@ NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
fallenBack = YES;
}
}
+ else if ([key isEqualToString: @"MP3 Passthru"])
+ {
+ if (![newAudio setCodecFromName: key])
+ {
+ [dict setObject: @"MP3 (lame)" forKey: @"AudioEncoder"];
+ fallenBack = YES;
+ }
+ }
+
+ // map legacy encoder names
if ([key isEqualToString: @"AC3"])
{
[dict setObject: @"AC3 (ffmpeg)" forKey: @"AudioEncoder"];
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
index e8be9227c..a381b09a8 100644
--- a/macosx/HBPreferencesController.m
+++ b/macosx/HBPreferencesController.m
@@ -64,7 +64,6 @@
@"0.25", @"x264CqSliderFractional",
@"YES", @"AlertBuiltInPresetUpdate",
@"MetaX", @"SendCompletedEncodeToApp",
- @"YES", @"AC3PassthruDefaultsToAC3",
nil]];
}