From: dynaflash Date: Fri, 29 May 2009 17:47:26 +0000 (+0000) Subject: MacGui: Add Preference to use CoreAudio in place of FAAC when choosing a preset. X-Git-Tag: 0.9.4~502 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40f5650a91f57c473a830f9e7ebd3c8b8525a5e9;p=handbrake MacGui: Add Preference to use CoreAudio in place of FAAC when choosing a preset. - Defaulted to "On". - Effectively allows the macgui to use core audio by default while maintaining the cross platform faac encoder in the built in preset's internally. - Also means that one can manually choose faac after selecting a preset if so desired. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2460 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 49e023c5d..1dc433bb0 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -5947,6 +5947,13 @@ return YES; } [self audioTrackPopUpChanged: fAudLang1PopUp]; [fAudTrack1CodecPopUp selectItemWithTitle:[tempObject objectForKey:@"AudioEncoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[tempObject objectForKey:@"AudioEncoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack1CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } + [self audioTrackPopUpChanged: fAudTrack1CodecPopUp]; [fAudTrack1MixPopUp selectItemWithTitle:[tempObject objectForKey:@"AudioMixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -5974,6 +5981,12 @@ return YES; } [self audioTrackPopUpChanged: fAudLang2PopUp]; [fAudTrack2CodecPopUp selectItemWithTitle:[tempObject objectForKey:@"AudioEncoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[tempObject objectForKey:@"AudioEncoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack2CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } [self audioTrackPopUpChanged: fAudTrack2CodecPopUp]; [fAudTrack2MixPopUp selectItemWithTitle:[tempObject objectForKey:@"AudioMixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -6026,6 +6039,12 @@ return YES; } [self audioTrackPopUpChanged: fAudLang1PopUp]; [fAudTrack1CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Encoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[chosenPreset objectForKey:@"Audio1Encoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack1CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } [self audioTrackPopUpChanged: fAudTrack1CodecPopUp]; [fAudTrack1MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Mixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -6051,6 +6070,12 @@ return YES; } [self audioTrackPopUpChanged: fAudLang2PopUp]; [fAudTrack2CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Encoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[chosenPreset objectForKey:@"Audio2Encoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack2CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } [self audioTrackPopUpChanged: fAudTrack2CodecPopUp]; [fAudTrack2MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Mixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -6076,6 +6101,12 @@ return YES; } [self audioTrackPopUpChanged: fAudLang3PopUp]; [fAudTrack3CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Encoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[chosenPreset objectForKey:@"Audio3Encoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack3CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } [self audioTrackPopUpChanged: fAudTrack3CodecPopUp]; [fAudTrack3MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Mixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -6101,6 +6132,12 @@ return YES; } [self audioTrackPopUpChanged: fAudLang4PopUp]; [fAudTrack4CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Encoder"]]; + /* check our pref for core audio and use it in place of faac if applicable */ + if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + [[chosenPreset objectForKey:@"Audio4Encoder"] isEqualToString: @"AAC (faac)"]) + { + [fAudTrack4CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; + } [self audioTrackPopUpChanged: fAudTrack4CodecPopUp]; [fAudTrack4MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Mixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default diff --git a/macosx/English.lproj/Preferences.xib b/macosx/English.lproj/Preferences.xib index bb9f7001c..d6d275b09 100644 --- a/macosx/English.lproj/Preferences.xib +++ b/macosx/English.lproj/Preferences.xib @@ -2,13 +2,13 @@ 1050 - 9G55 + 9J61 677 - 949.43 + 949.46 353.00 YES - + YES @@ -56,10 +56,6 @@ {3.40282e+38, 3.40282e+38} - - YES - AlertBuiltInPresetUpdate - YES @@ -203,7 +199,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -479,21 +475,25 @@ NSResponder - + 256 YES 256 - {{76, 42}, {114, 17}} + {{76, 78}, {114, 14}} YES 67239424 - 272629760 + 272760832 Native Language: - + + LucidaGrande + 1.100000e+01 + 3100 + @@ -502,14 +502,14 @@ 256 - {{195, 38}, {229, 26}} + {{184, 72}, {229, 22}} YES 343014976 - 272630784 + 272761856 English - + YES @@ -727,7 +727,7 @@ 338820672 1024 - + YES @@ -755,7 +755,7 @@ MC41AA - 1.900000e+01 + 1.600000e+01 tableViewAction: -765427712 @@ -771,7 +771,7 @@ -2147483392 - {{18, 17}, {472, 18}} + {{18, 18}, {472, 18}} YES @@ -789,15 +789,38 @@ 25 + + + 268 + {{77, 44}, {402, 18}} + + YES + + -2080244224 + 131072 + Use CoreAudio instead of FAAC for preset default encoder + + + 1211912703 + 130 + + + + + 200 + 25 + + - {500, 82} + {532, 115} + NSView NSResponder - + 256 YES @@ -974,11 +997,7 @@ -2076049856 133120 - - LucidaGrande - 1.100000e+01 - 3100 - + 109199615 129 @@ -1197,7 +1216,6 @@ {479, 291} - NSView @@ -1511,6 +1529,22 @@ 403 + + + value: values.UseCoreAudio + + + + + + value: values.UseCoreAudio + value + values.UseCoreAudio + 2 + + + 409 + @@ -1675,6 +1709,7 @@ + Audio @@ -2189,6 +2224,20 @@ + + 406 + + + YES + + + + + + 407 + + + @@ -2332,6 +2381,8 @@ 401.IBPluginDependency 401.ImportedFromIB2 402.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency 5.IBEditorWindowLastContentRect 5.IBWindowTemplateEditedContentRect 5.ImportedFromIB2 @@ -2357,10 +2408,10 @@ com.apple.InterfaceBuilder.CocoaPlugin {{0, 726}, {500, 108}} - {{73, 774}, {500, 82}} + {{73, 741}, {532, 115}} com.apple.InterfaceBuilder.CocoaPlugin - {{404, 482}, {479, 291}} + {{194, 482}, {479, 291}} com.apple.InterfaceBuilder.CocoaPlugin {{0, 650}, {500, 184}} @@ -2483,6 +2534,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{69, 656}, {500, 200}} {{69, 656}, {500, 200}} @@ -2516,7 +2569,7 @@ - 403 + 409 diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 0deddbf2f..3e9a735c9 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -45,6 +45,7 @@ @"YES", @"CheckForUpdates", @"Open Source", @"LaunchSourceBehavior", @"English", @"DefaultLanguage", + @"YES", @"UseCoreAudio", @"NO", @"DefaultMpegName", @"YES", @"DefaultCrf", @"NO", @"UseDvdNav",