From 2b6d88894dab3290fcb8ded79e03d69d40dd6dc3 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Tue, 1 Jan 2013 18:38:36 +0000 Subject: MacGui: Initial x264 presets implementation. - Note: HB Built-ins are not updated as needs more testing - Backwards compatible afaik for older presets including custom. - Queue Item editing function needs to be updated yet. - Preset import/ export will probably need work as well especially since some kvp's seem to still be up in the air. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5126 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.h | 28 + macosx/Controller.m | 496 +++++++++++- macosx/English.lproj/MainMenu.xib | 1418 +++++++++++++++++++++++++++++++--- macosx/English.lproj/OutputPanel.xib | 305 +++----- macosx/HBQueueController.mm | 55 +- 5 files changed, 1995 insertions(+), 307 deletions(-) diff --git a/macosx/Controller.h b/macosx/Controller.h index 5c8ddf34a..dc5d36198 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -59,6 +59,24 @@ BOOL fIsDragging; /* Picture Preview */ PreviewController * fPreviewController; + /* x264 Presets Box */ + IBOutlet NSButton * fx264UseAdvancedOptionsCheck; + IBOutlet NSBox * fX264PresetsBox; + IBOutlet NSSlider * fX264PresetsSlider; + IBOutlet NSTextField * fX264PresetSliderLabel; + IBOutlet NSTextField * fX264PresetSelectedTextField; + IBOutlet NSPopUpButton * fX264TunePopUp; + IBOutlet NSTextField * fX264TunePopUpLabel; + IBOutlet NSPopUpButton * fX264ProfilePopUp; + IBOutlet NSTextField * fX264ProfilePopUpLabel; + IBOutlet NSPopUpButton * fX264LevelPopUp; + IBOutlet NSTextField * fX264LevelPopUpLabel; + IBOutlet NSButton * fX264FastDecodeCheck; + IBOutlet NSTextField * fDisplayX264PresetsAdditonalOptionsTextField; + IBOutlet NSTextField * fDisplayX264PresetsAdditonalOptionsLabel; + // Text Field to show the expanded opts from unparse() + IBOutlet NSTextField * fDisplayX264PresetsUnparseTextField; + /* Advanced options tab */ HBAdvancedController * fAdvancedOptions; IBOutlet NSBox * fAdvancedView; @@ -282,6 +300,11 @@ BOOL fIsDragging; - (void) updateUI: (NSTimer *) timer; - (void) enableUI: (bool) enable; +- (IBAction) enableX264PresetWidgets: (id) sender; +- (IBAction) setupX264PresetsWidgets: (id) sender; +- (IBAction) x264PresetsSetJobVariables: (id) sender; +- (IBAction) x264PresetsChangedDisplayExpandedOptions: (id) sender; + - (IBAction) encodeStartStopPopUpChanged: (id) sender; @@ -455,5 +478,10 @@ BOOL fIsDragging; - (BOOL)performDragOperation:(id )sender; - (void) updateDockIcon:(double)progress withETA:(NSString*)etaStr; + +// x264 Presets methods +- (IBAction) x264PresetsSliderChanged: (id) sender; + + @end diff --git a/macosx/Controller.m b/macosx/Controller.m index e93bd8e54..f1c7d9395 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -678,6 +678,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [fVidEncoderPopUp removeAllItems]; [fVidEncoderPopUp addItemWithTitle: @"FFmpeg"]; + /* Setup our x264 presets widgets */ + [self setupX264PresetsWidgets: nil]; /* Video quality */ [fVidBitrateField setIntValue: 1000]; @@ -752,9 +754,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It fCreateChapterMarkers,fVidTurboPassCheck,fDstMp4LargeFileCheck,fSubForcedCheck,fPresetsOutlineView, fDstMp4HttpOptFileCheck,fDstMp4iPodFileCheck,fVidQualityRFField,fVidQualityRFLabel, fEncodeStartStopPopUp,fSrcTimeStartEncodingField,fSrcTimeEndEncodingField,fSrcFrameStartEncodingField, - fSrcFrameEndEncodingField, fLoadChaptersButton, fSaveChaptersButton, fFramerateMatrix + fSrcFrameEndEncodingField, fLoadChaptersButton, fSaveChaptersButton, fFramerateMatrix, + fX264PresetsSlider,fX264PresetSliderLabel,fX264PresetSelectedTextField,fX264TunePopUp,fX264TunePopUpLabel, + fX264ProfilePopUp,fX264ProfilePopUpLabel,fX264LevelPopUp,fX264LevelPopUpLabel,fX264FastDecodeCheck, + fDisplayX264PresetsAdditonalOptionsTextField,fDisplayX264PresetsAdditonalOptionsLabel,fx264UseAdvancedOptionsCheck + }; - for( unsigned i = 0; i < sizeof( controls ) / sizeof( NSControl * ); i++ ) { @@ -771,6 +776,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [controls[i] setEnabled: b]; } + if (b) { @@ -789,6 +795,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [self videoMatrixChanged:nil]; [fAdvancedOptions enableUI:b]; + [self enableX264PresetWidgets:nil]; } @@ -2525,8 +2532,45 @@ fWorkingCount = 0; /* Codecs */ /* Video encoder */ [queueFileJob setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"]; - /* x264 Option String */ + + /* x264 Preset, Tune, Profile, and Levels */ + if (![fx264UseAdvancedOptionsCheck state]) + { + // Set the x264 Preset + [queueFileJob setObject:[NSString stringWithFormat:@"%@", [fX264PresetSelectedTextField stringValue]] forKey:@"x264Preset"]; + + if ([fX264TunePopUp indexOfSelectedItem] != 0) + { // we check to see if fastdecode is checked and if so we append it to the tune as so... + if ([fX264FastDecodeCheck state] == NSOnState) + { + [queueFileJob setObject:[NSString stringWithFormat:@"%@,%@", [fX264TunePopUp titleOfSelectedItem], @"fastdecode"] forKey:@"x264Tune"]; + + + } + else + { + [queueFileJob setObject:[NSString stringWithFormat:@"%@", [fX264TunePopUp titleOfSelectedItem]] forKey:@"x264Tune"]; + + } + } + } + + // Make sure we are not ignoring the setting, for Profile its "auto" but index 0 + if ([fX264ProfilePopUp indexOfSelectedItem] != 0) + { + [queueFileJob setObject:[NSString stringWithFormat:@"%@", [fX264ProfilePopUp titleOfSelectedItem]] forKey:@"h264Profile"]; + } + // Make sure we are not ignoring the setting, for Level its "auto" but index 0 + if ([fX264LevelPopUp indexOfSelectedItem] != 0) + { + [queueFileJob setObject:[NSString stringWithFormat:@"%@", [fX264LevelPopUp titleOfSelectedItem]] forKey:@"h264Level"]; + } + [queueFileJob setObject:[NSString stringWithFormat:@"%@", [fDisplayX264PresetsAdditonalOptionsTextField stringValue]] forKey:@"x264AdditionalOptions"]; + /* END x264 Preset, Tune, Profile, and Levels */ + + /* x264 Advanced Option String */ [queueFileJob setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + /* FFmpeg (lavc) Option String */ [queueFileJob setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"]; @@ -3226,10 +3270,21 @@ fWorkingCount = 0; { /* Below Sends x264 options to the core library if x264 is selected*/ - /* Lets use this as per Nyx, Thanks Nyx! */ - /* For previews we ignore the turbo option for the first pass of two since we only use 1 pass */ job->fastfirstpass = 0; - hb_job_set_advanced_opts(job, [[fAdvancedOptions optionsString] UTF8String] ); + + // we are none on the x264 preset slider so use the advanced options panel + //if ([fX264PresetsSlider intValue] == 0) + if ([fx264UseAdvancedOptionsCheck state]) + { + hb_job_set_advanced_opts(job, [[fAdvancedOptions optionsString] UTF8String] ); + } + else + { + // we are using x264 presets + // so we set the presets, and tune etc according to the widgets + [self x264PresetsSetJobVariables:nil]; + + } } else if( job->vcodec & HB_VCODEC_FFMPEG_MASK ) { @@ -3721,7 +3776,22 @@ bool one_burned = FALSE; { job->fastfirstpass = 0; } - hb_job_set_advanced_opts( job, [[queueToApply objectForKey:@"x264Option"] UTF8String] ); + + /* Here we pass the x264 preset, profile, tune, level to libhb or the advanced string */ + // First make sure we are not on the first tickmark for preset which does not use x264 presets + if([queueToApply objectForKey:@"x264Preset"]) + { + hb_job_set_x264_preset(job, [[queueToApply objectForKey:@"x264Preset"]UTF8String] ); + // Note we do not have to append fast decode here to tune because it was already done in preparing the queue file item + hb_job_set_x264_tune (job, [[queueToApply objectForKey:@"x264Tune"]UTF8String] ); + hb_job_set_x264_profile(job, [[queueToApply objectForKey:@"x264Profile"]UTF8String] ); + hb_job_set_x264_level(job, [[queueToApply objectForKey:@"x264Level"]UTF8String] ); + hb_job_set_advanced_opts( job, [[queueToApply objectForKey:@"x264AdditionalOptions"] UTF8String] ); + } + else + { + hb_job_set_advanced_opts( job, [[queueToApply objectForKey:@"x264Option"] UTF8String] ); + } } else if( job->vcodec & HB_VCODEC_FFMPEG_MASK ) { @@ -4905,15 +4975,20 @@ the user is using "Custom" settings by determining the sender*/ int videoEncoder = [[fVidEncoderPopUp selectedItem] tag]; [fAdvancedOptions setHidden:YES]; - /* If we are using x264 then show the x264 advanced panel */ + /* If we are using x264 then show the x264 advanced panel and the x264 presets box */ if (videoEncoder == HB_VCODEC_X264) { [fAdvancedOptions setHidden:NO]; + + // show the x264 presets box + [fX264PresetsBox setHidden:NO]; + [self autoSetM4vExtension: sender]; } else // we are FFmpeg (lavc) or Theora { [fAdvancedOptions setHidden:YES]; + [fX264PresetsBox setHidden:YES]; // We Are Lavc if ([[fVidEncoderPopUp selectedItem] tag] & HB_VCODEC_FFMPEG_MASK) @@ -4922,7 +4997,7 @@ the user is using "Custom" settings by determining the sender*/ } else /// We are Theora { - [fAdvancedOptions setLavcOptsEnabled:NO]; + [fAdvancedOptions setLavcOptsEnabled:NO]; } } @@ -5085,6 +5160,7 @@ the user is using "Custom" settings by determining the sender*/ - (IBAction) qualitySliderChanged: (id) sender { + /* Our constant quality slider is in a range based * on each encoders qp/rf values. The range depends * on the encoder. Also, the range is inverse of quality @@ -5118,6 +5194,7 @@ the user is using "Custom" settings by determining the sender*/ [self customSettingUsed: sender]; } + - (void) controlTextDidChange: (NSNotification *) notification { [self calculateBitrate:nil]; @@ -5151,6 +5228,249 @@ the user is using "Custom" settings by determining the sender*/ } +#pragma mark - +#pragma mark - Video x264 Presets + +- (IBAction) setupX264PresetsWidgets: (id) sender +{ + //now we populate the x264 opts widgets via hb_x264_presets(), + //hb_x264_tunes(), hb_x264_profiles(), hb_h264_levels() + + const char * const* x264_presets = hb_x264_presets(); + + // Presets Slider + + [fX264PresetsSlider setMinValue:0.0]; + + int i; + int presetsCount = 0; + for (i = 0; x264_presets[i] != NULL; i++) + { + presetsCount++; + } + float presetsSliderMaxvalue = i; + [fX264PresetsSlider setMaxValue: presetsSliderMaxvalue - 1 ]; + + [fX264PresetsSlider setNumberOfTickMarks: i]; + + // Tune popup + [fX264TunePopUp removeAllItems]; + // we add a dummy "none" label to the tune popup + [fX264TunePopUp addItemWithTitle: @"none"]; + const char * const* x264_tunes = hb_x264_tunes(); + for (int i = 0; x264_tunes[i] != NULL; i++) + { + // we filter out the "fastdecode" x264 tune as we add it appended to the rest of the tunes + // via our fastdecode checkbox + if (![[NSString stringWithFormat: @"%s",x264_tunes[i]] isEqualToString: @"fastdecode"]) + { + [fX264TunePopUp addItemWithTitle: [NSString stringWithFormat: @"%s",x264_tunes[i]]]; + } + } + + // Fast Decode checkbox is by default off fwiw. + [fX264FastDecodeCheck setState: NSOffState]; + + // Profile popup + [fX264ProfilePopUp removeAllItems]; + // we add a dummy "auto" to the profile popup + [fX264ProfilePopUp addItemWithTitle: @"auto"]; + const char * const* x264_profiles = hb_x264_profiles(); + for (int i = 0; x264_profiles[i] != NULL; i++) + { + [fX264ProfilePopUp addItemWithTitle: [NSString stringWithFormat: @"%s",x264_profiles[i]]]; + } + + // Level popup + [fX264LevelPopUp removeAllItems]; + // we add a dummy "auto" to the level popup + [fX264LevelPopUp addItemWithTitle: @"auto"]; + const char * const* x264_levels = hb_h264_levels(); + for (int i = 0; x264_levels[i] != NULL; i++) + { + [fX264LevelPopUp addItemWithTitle: [NSString stringWithFormat: @"%s",x264_levels[i]]]; + } + + // set clear the additional options + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""]; + + // Call x264PresetsSliderChanged to set the slider values + [self x264PresetsSliderChanged: sender]; + +} + +- (IBAction) enableX264PresetWidgets: (id) sender +{ + bool b; + // we are advanced opts panel ... + if ([fx264UseAdvancedOptionsCheck state] == NSOnState) + { + b = 0; + [fAdvancedOptions enableUI:YES]; + } + else + { + b = 1; + [fAdvancedOptions enableUI:NO]; + } + + NSControl * controls[] = + { + fX264TunePopUp, + fX264TunePopUpLabel, + fX264ProfilePopUp, + fX264ProfilePopUpLabel, + fX264LevelPopUp, + fX264LevelPopUpLabel, + fX264FastDecodeCheck, + fDisplayX264PresetsAdditonalOptionsTextField, + fDisplayX264PresetsAdditonalOptionsLabel,fX264PresetsSlider, + fX264PresetsSlider,fX264PresetSliderLabel,fX264PresetSelectedTextField, + fDisplayX264PresetsUnparseTextField + }; + + for( unsigned i = 0; + i < sizeof( controls ) / sizeof( NSControl * ); i++ ) + { + if( [[controls[i] className] isEqualToString: @"NSTextField"] ) + { + NSTextField * tf = (NSTextField *) controls[i]; + if( ![tf isBezeled] ) + { + [tf setTextColor: b ? [NSColor controlTextColor] : + [NSColor disabledControlTextColor]]; + continue; + } + } + [controls[i] setEnabled: b]; + + } +} + + +- (IBAction) x264PresetsSliderChanged: (id) sender +{ + + // Walk the array of x264 presets and insert the name of the preset + // at each of the stops in fX264PresetSelectedTextField for display. + int chosenX264PresetIndex = [fX264PresetsSlider intValue]; + const char * const* x264_presets = hb_x264_presets(); + for (int i = 0; x264_presets[i] != NULL; i++) + { + if (chosenX264PresetIndex == i) + { + [fX264PresetSelectedTextField setStringValue: [NSString stringWithFormat: @"%s",x264_presets[i]]]; + } + } + + [self x264PresetsChangedDisplayExpandedOptions:nil]; + +} + +/* This is called everytime a x264 widget in the video tab is changed to + display the expanded options in a text field via outlet fDisplayX264PresetsUnparseTextField + */ +- (IBAction) x264PresetsChangedDisplayExpandedOptions: (id) sender + +{ + + // first we clear whatever is in fDisplayX264PresetsUnparseTextField + [fDisplayX264PresetsUnparseTextField setStringValue:@""]; + + // try to get our unparse from the widgets + + /* char * hb_x264_param_unparse(const char *x264_preset, + const char *x264_tune, + const char *x264_encopts, + const char *x264_profile, + const char *h264_level, + int width, + int height); + */ + + /* We need to create a wrapper to take care of appending fastdecode to tune if Fast Decode is checked */ + NSString * preset = [fX264PresetSelectedTextField stringValue]; + NSString * tune = [fX264TunePopUp titleOfSelectedItem]; + NSString * profile = [fX264ProfilePopUp titleOfSelectedItem]; + NSString * level = [fX264LevelPopUp titleOfSelectedItem]; + //Parse out default labels from the popups + if ([fX264TunePopUp indexOfSelectedItem] == 0) + { + if ([fX264FastDecodeCheck state] == NSOnState) + { + tune = @"fastdecode"; + } + else + { + tune = NULL; + } + } + else + { + if ([fX264FastDecodeCheck state] == NSOnState) + { + tune = [tune stringByAppendingString:@",fastdecode"]; + } + } + + if ([fX264ProfilePopUp indexOfSelectedItem] == 0) + { + profile = NULL; + } + + if ([fX264LevelPopUp indexOfSelectedItem] == 0) + { + level = NULL; + } + + /* note we feed hb_x264_param_unparse for now bogus width and height value as per Rodeo, here we use 1280 x 720 */ + char *unparsed_string = hb_x264_param_unparse([[fX264PresetSelectedTextField stringValue] UTF8String], [tune UTF8String], [[fDisplayX264PresetsAdditonalOptionsTextField stringValue] UTF8String], [profile UTF8String], [level UTF8String], 1280, 720); + + [fDisplayX264PresetsUnparseTextField setStringValue: [NSString stringWithFormat:@"x264 Unparse: %s", unparsed_string]]; + +} + + +- (IBAction) x264PresetsSetJobVariables: (id) sender + +{ + + hb_list_t * list = hb_get_titles( fHandle ); + hb_title_t * title = (hb_title_t *) hb_list_item( list, + [fSrcTitlePopUp indexOfSelectedItem] ); + hb_job_t * job = title->job; + + hb_job_set_x264_preset(job, [[fX264PresetSelectedTextField stringValue]UTF8String] ); + + // Make sure we are not ignoring the setting, for Tune its "none" but index 0 + if ([fX264TunePopUp indexOfSelectedItem] != 0) + { + // we check to see if fastdecode is checked and if so we append it to the tune as so... + if ([fX264FastDecodeCheck state] == NSOnState) + { + hb_job_set_x264_tune (job, [[NSString stringWithFormat:@"%@,%@", [fX264TunePopUp titleOfSelectedItem], @"fastdecode"] UTF8String] ); + + } + else + { + hb_job_set_x264_tune (job, [[fX264TunePopUp titleOfSelectedItem]UTF8String] ); + } + } + // Make sure we are not ignoring the setting, for Profile its "auto" but index 0 + if ([fX264ProfilePopUp indexOfSelectedItem] != 0) + { + hb_job_set_x264_profile(job, [[fX264ProfilePopUp titleOfSelectedItem]UTF8String] ); + } + // Make sure we are not ignoring the setting, for Level its "auto" but index 0 + if ([fX264LevelPopUp indexOfSelectedItem] != 0) + { + hb_job_set_x264_level(job, [[fX264LevelPopUp titleOfSelectedItem]UTF8String] ); + } + + hb_job_set_advanced_opts(job, [[fDisplayX264PresetsAdditonalOptionsTextField stringValue] UTF8String] ); + +} + #pragma mark - #pragma mark - Picture @@ -5818,15 +6138,109 @@ return YES; /* Video encoder */ [fVidEncoderPopUp selectItemWithTitle:[chosenPreset objectForKey:@"VideoEncoder"]]; [self videoEncoderPopUpChanged:nil]; - /* We set the advanced opt string here if applicable*/ - if ([chosenPreset objectForKey:@"x264Option"]) - { - [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]]; - } - else + + if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"H.264 (x264)"]) { - [fAdvancedOptions setOptions:@""]; + /* First we see if we are using the x264 presets in the video tab + We check to see if there is not a x264UseAdvancedOptions key which will tell + us not to use the advanced opts tab, but then we also want to check for a x264Preset + key as that would rule out a vestigial custom hb preset as well (since an older pre-x264Preset + in HB would not have this key and then go back to using the Advanced Panel). + */ + if (![chosenPreset objectForKey:@"x264UseAdvancedOptions"] && [chosenPreset objectForKey:@"x264Preset"]) + { + /* Set the fx264UseAdvancedOptionsCheck */ + [fx264UseAdvancedOptionsCheck setState: NSOffState]; + [self setupX264PresetsWidgets: nil]; + [self enableX264PresetWidgets: nil]; + + /* Set the x264 preset slider */ + + const char * const* x264_presets = hb_x264_presets(); + for (int i = 0; x264_presets[i] != NULL; i++) + { + if ([[chosenPreset objectForKey:@"x264Preset"] isEqualToString: [NSString stringWithFormat: @"%s",x264_presets[i]]]) + { + [fX264PresetsSlider setFloatValue: i]; + [self x264PresetsSliderChanged:nil]; + } + } + + /* x264 tune */ + if (![[chosenPreset objectForKey:@"x264Tune"] isEqualToString: @""]) + { + [fX264TunePopUp selectItemWithTitle:[chosenPreset objectForKey:@"x264Tune"]]; + } + else + { + /* if the preset does not specify use index 0 */ + [fX264TunePopUp selectItemAtIndex:0]; + } + + /* Fast Decode checkbox*/ + if ([chosenPreset objectForKey:@"x264FastDecode"]) + { + [fX264FastDecodeCheck setState: [[chosenPreset objectForKey:@"x264FastDecode"] intValue]]; + } + else + { + [fX264FastDecodeCheck setState: NSOffState]; + } + + /* x264 Profile */ + if (![[chosenPreset objectForKey:@"h264Profile"] isEqualToString: @""]) + { + [fX264ProfilePopUp selectItemWithTitle:[chosenPreset objectForKey:@"h264Profile"]]; + } + else + { + /* if the preset does not specify use index 0 */ + [fX264ProfilePopUp selectItemAtIndex:0]; + } + + /* x264 Level */ + if (![[chosenPreset objectForKey:@"h264Level"] isEqualToString: @""]) + { + [fX264LevelPopUp selectItemWithTitle:[chosenPreset objectForKey:@"h264Level"]]; + } + else + { + [fX264LevelPopUp selectItemAtIndex:0]; + } + + /* We set the advanced opt string here if applicable*/ + if ([chosenPreset objectForKey:@"x264Option"]) + { + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:[chosenPreset objectForKey:@"x264Option"]]; + } + else + { + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""]; + } + + [self x264PresetsChangedDisplayExpandedOptions:nil]; + } + else + { + /* we are advanced panel so we reset all of the x264 widgets */ + /* Set the slider to float 0.0 which will trigger the advanced panel */ + [fx264UseAdvancedOptionsCheck setState: NSOnState]; + [self setupX264PresetsWidgets: nil]; + [self enableX264PresetWidgets: nil]; + + /* We set the advanced opt string here if applicable*/ + if ([chosenPreset objectForKey:@"x264Option"]) + { + [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]]; + } + else + { + [fAdvancedOptions setOptions:@""]; + } + } + } + if ([chosenPreset objectForKey:@"lavcOption"]) { [fAdvancedOptions setLavcOptions:[chosenPreset objectForKey:@"lavcOption"]]; @@ -6425,8 +6839,54 @@ return YES; /* Codecs */ /* Video encoder */ [preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"]; - /* x264 Option String */ - [preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + /* x264 Options, this will either be advanced panel or the video tabs x264 presets panel with modded option string */ + + // first lets check the extra left mark which is our custom/none setting in which case we use the advanced panel. + // Otherwise we use the x264 presets in the video tab. + if ([fX264PresetsSlider intValue] == 0) + { + /* x264 Advanced Panel Option String */ + [preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + } + else + { + /* if we are not using the full advanced panel custom string then we go to the video panel x264 presets + tab. + */ + + // First we get the x264 preset: + // Set the x264 Preset + [preset setObject:[fX264PresetSelectedTextField stringValue] forKey:@"x264Preset"]; + + // Set tune but observe the fast decode checkbox to append fastdecode to the tune: + + // NOTE TO ME, Check for utf8 string Here though we should be sanitizing it in -presetSelected !!!!!!!!!! + if ([fX264TunePopUp indexOfSelectedItem] != 0) + { // we check to see if fastdecode is checked and if so we append it to the tune as so... + [preset setObject: [fX264TunePopUp titleOfSelectedItem] forKey:@"x264Tune"]; + + // Now check to see if we are using Fast Decode ... + [preset setObject: [NSNumber numberWithInt:[fX264FastDecodeCheck state]] forKey:@"x264FastDecode"]; + } + + // Make sure we are not ignoring the setting, for Profile its "auto" but index 0 + if ([fX264ProfilePopUp indexOfSelectedItem] != 0) + { + [preset setObject:[fX264ProfilePopUp titleOfSelectedItem] forKey:@"x264Profile"]; + } + + // Make sure we are not ignoring the setting, for Level its "auto" but index 0 + if ([fX264LevelPopUp indexOfSelectedItem] != 0) + { + [preset setObject:[fX264LevelPopUp titleOfSelectedItem] forKey:@"x264Level"]; + } + + // we set the x264Option advanced option key to string from fDisplayX264PresetsAdditonalOptionsTextField + + [preset setObject:[fDisplayX264PresetsAdditonalOptionsTextField stringValue] forKey:@"x264Option"]; + + } + /* FFmpeg (lavc) Option String */ [preset setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"]; diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib index 7ab1be7d3..3fb52afdf 100644 --- a/macosx/English.lproj/MainMenu.xib +++ b/macosx/English.lproj/MainMenu.xib @@ -2,10 +2,10 @@ 1050 - 11C74 + 11G63 1938 - 1138.23 - 567.00 + 1138.51 + 569.00 com.apple.InterfaceBuilder.CocoaPlugin 1938 @@ -127,6 +127,7 @@ {{18, -26}, {930, 20}} + 16396 100 @@ -136,20 +137,23 @@ {{13, 28}, {940, 343}} + YES 1 - + 256 YES 256 - {{14, 205}, {94, 19}} + {{14, 247}, {94, 19}} + + YES 67239424 @@ -164,8 +168,10 @@ 256 - {{170, 166}, {84, 19}} + {{170, 209}, {84, 19}} + + YES -1804468671 @@ -194,8 +200,10 @@ 256 - {{281, 186}, {622, 16}} + {{281, 229}, {622, 16}} + + YES 67501824 @@ -222,8 +230,10 @@ 256 - {{14, 63}, {892, 14}} + {{14, 30}, {892, 14}} + + YES 67239424 @@ -238,8 +248,10 @@ 256 - {{192, 188}, {65, 14}} + {{192, 231}, {65, 14}} + + YES 67239424 @@ -321,8 +333,10 @@ 256 - {{167, 188}, {28, 14}} + {{167, 231}, {28, 14}} + + YES 67239424 @@ -337,8 +351,10 @@ 256 - {{14, 45}, {892, 14}} + {{14, 15}, {892, 14}} + + YES 67239424 @@ -353,8 +369,10 @@ 256 - {{14, 17}, {892, 14}} + {{14, 2}, {892, 14}} + + YES 67239424 @@ -369,8 +387,10 @@ 256 - {{372, 254}, {158, 22}} + {{372, 272}, {158, 22}} + + YES -2076049856 @@ -423,8 +443,10 @@ 256 - {{279, 166}, {124, 18}} + {{279, 209}, {124, 18}} + + YES 67239424 @@ -446,8 +468,10 @@ 256 - {{416, 167}, {107, 16}} + {{416, 210}, {107, 16}} + + YES 67239424 @@ -471,8 +495,10 @@ 256 - {{98, 254}, {149, 22}} + {{98, 272}, {149, 22}} + + YES -2076049856 @@ -519,8 +545,10 @@ 256 - {{278, 256}, {92, 17}} + {{278, 274}, {92, 17}} + + YES 67239424 @@ -535,8 +563,10 @@ 256 - {{14, 256}, {79, 17}} + {{14, 274}, {79, 17}} + + YES 67239424 @@ -551,8 +581,10 @@ 268 - {{17, 166}, {145, 38}} + {{17, 209}, {145, 38}} + + YES 2 1 @@ -752,8 +784,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 - {{540, 237}, {157, 38}} + {{540, 255}, {157, 38}} + + YES 2 1 @@ -941,8 +975,487 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + 12 + + YES + + + 274 + + YES + + + 268 + {{212, 105}, {660, 16}} + + + + _NS:779 + YES + + -2079981824 + 262144 + + _NS:779 + + 5 + 0.0 + 0.0 + 0.0 + 2 + 1 + YES + NO + + + + + 256 + {{15, 107}, {79, 13}} + + + + YES + + 67239424 + 71303168 + x264 Preset: + + + + + + + + + 256 + {{15, 86}, {79, 13}} + + + + YES + + 67239424 + 71303168 + x264 Tune: + + + + + + + + + 256 + {{15, 65}, {79, 13}} + + + + YES + + 67239424 + 71303168 + x264 Profile: + + + + + + + + + 256 + {{15, 43}, {79, 13}} + + + + YES + + 67239424 + 71303168 + x264 Level: + + + + + + + + + 268 + {{98, 84}, {126, 15}} + + + + _NS:868 + YES + + -2076049856 + 264192 + + _NS:868 + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Item 2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item 3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + 3 + YES + YES + 1 + + + + + 268 + {{98, 63}, {126, 15}} + + + + _NS:868 + YES + + -2076049856 + 264192 + + _NS:868 + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Item 2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item 3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + 3 + YES + YES + 1 + + + + + 268 + {{98, 41}, {126, 15}} + + + + _NS:868 + YES + + -2076049856 + 264192 + + _NS:868 + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Item 2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item 3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + 3 + YES + YES + 1 + + + + + 268 + {{240, 84}, {108, 18}} + + + + _NS:771 + YES + + 67239424 + 131072 + Fast Decode + + _NS:771 + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{240, 65}, {110, 13}} + + + + YES + + 67239424 + 71303168 + Additional Options: + + + + + + + + + 268 + {{355, 43}, {517, 36}} + + + + _NS:354 + {250, 750} + YES + + -1805517311 + 272760832 + + + _NS:354 + + YES + + + + + + + 256 + {{96, 107}, {95, 13}} + + + + YES + + 67239424 + 138412032 + + + + + + + + + + 268 + {{20, 127}, {209, 18}} + + + + _NS:771 + YES + + 67239424 + 131072 + Use x264 Advanced Options Panel + + _NS:771 + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{22, 6}, {853, 29}} + + + + YES + + 67239424 + 4194304 + x264 Unparse: + + + + + + + + {{1, 1}, {890, 155}} + + + + _NS:21 + + + {{14, 46}, {892, 157}} + + + + _NS:18 + {0, 0} + + 67239424 + 0 + x264 Presets + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 0 + NO + {{10, 25}, {920, 305}} + + + Video @@ -951,7 +1464,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 2 - + 256 YES @@ -975,7 +1488,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 256 {884, 236} - YES @@ -983,7 +1495,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 256 {884, 17} - @@ -992,7 +1503,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{-26, 0}, {16, 17}} - @@ -1439,7 +1949,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 17}, {884, 236}} - @@ -1450,7 +1959,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{-100, -100}, {15, 206}} - _doScroller: @@ -1462,7 +1970,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{-100, -100}, {685, 15}} - 1 @@ -1478,7 +1985,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 0}, {884, 17}} - @@ -1488,14 +1994,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{17, 17}, {886, 254}} - 133650 - QSAAAEEgAABB2AAAQdgAAA @@ -1503,7 +2007,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 282}, {116, 16}} - YES @@ -1535,7 +2038,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{85, 8}, {41, 18}} - _NS:771 YES @@ -1561,7 +2063,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{130, 8}, {47, 18}} - _NS:771 YES @@ -1587,7 +2088,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{179, 8}, {47, 18}} - _NS:771 YES @@ -1613,7 +2113,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{226, 8}, {48, 18}} - _NS:771 YES @@ -1639,7 +2138,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{271, 8}, {58, 18}} - _NS:771 YES @@ -1665,7 +2163,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{442, 8}, {100, 15}} - _NS:868 YES @@ -1735,7 +2232,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 264 {{2, -7}, {78, 28}} - YES @@ -1753,7 +2249,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 264 {{354, 7}, {86, 14}} - YES @@ -1769,14 +2264,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {552, 29}} - _NS:21 {{349, 275}, {554, 31}} - _NS:18 {0, 0} @@ -1800,13 +2293,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{0, -3}, {920, 305}} - {{10, 25}, {920, 305}} - - Audio @@ -2258,6 +2748,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{7, 8}, {907, 290}} + {0, 0} 67239424 @@ -2278,6 +2769,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{10, 25}, {920, 305}} + Advanced @@ -2521,14 +3013,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - + 134217728 YES YES YES - + @@ -6483,89 +6975,265 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - parentWindow - - + fX264PresetsBox + + - 1842 + 5973 - contentView - - + fX264TunePopUp + + - 1844 + 5974 - - toggle: - - + + fX264ProfilePopUp + + - 1885 + 5975 - dataSource - - + fX264LevelPopUp + + - 4188 + 5976 - delegate - - + fX264FastDecodeCheck + + - 4189 + 5977 + + + + fDisplayX264PresetsAdditonalOptionsTextField + + + + 5979 + + + + fX264PresetsSlider + + + + 5980 + + + + fX264PresetSelectedTextField + + + + 5983 - checkForUpdates: - - + x264PresetsSliderChanged: + + - 4966 + 5984 - - contentArray: audioArray - - - - - - contentArray: audioArray - contentArray - audioArray - 2 - + + fX264PresetSliderLabel + + - 5679 + 5985 - - enabled: hasValidPresetSelected - - - - - - enabled: hasValidPresetSelected - enabled - hasValidPresetSelected - 2 - + + fX264TunePopUpLabel + + - 5711 + 5986 - - value: arrangedObjects.drc - - + + fX264ProfilePopUpLabel + + + + 5987 + + + + fX264LevelPopUpLabel + + + + 5988 + + + + fDisplayX264PresetsAdditonalOptionsLabel + + + + 5989 + + + + fx264UseAdvancedOptionsCheck + + + + 5994 + + + + enableX264PresetWidgets: + + + + 5995 + + + + fDisplayX264PresetsUnparseTextField + + + + 5998 + + + + x264PresetsChangedDisplayExpandedOptions: + + + + 5999 + + + + x264PresetsChangedDisplayExpandedOptions: + + + + 6000 + + + + x264PresetsChangedDisplayExpandedOptions: + + + + 6001 + + + + x264PresetsChangedDisplayExpandedOptions: + + + + 6002 + + + + x264PresetsChangedDisplayExpandedOptions: + + + + 6003 + + + + parentWindow + + + + 1842 + + + + contentView + + + + 1844 + + + + toggle: + + + + 1885 + + + + dataSource + + + + 4188 + + + + delegate + + + + 4189 + + + + checkForUpdates: + + + + 4966 + + + + contentArray: audioArray + + + + + + contentArray: audioArray + contentArray + audioArray + 2 + + + 5679 + + + + enabled: hasValidPresetSelected + + + + + + enabled: hasValidPresetSelected + enabled + hasValidPresetSelected + 2 + + + 5711 + + + + value: arrangedObjects.drc + + @@ -7214,9 +7882,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - - @@ -7228,7 +7894,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + + @@ -10088,6 +10757,314 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + 5934 + + + YES + + + + + + + + + + + + + + + + + + + 5932 + + + YES + + + + + + 5933 + + + + + 5937 + + + YES + + + + + + 5938 + + + + + 5939 + + + YES + + + + + + 5940 + + + + + 5941 + + + YES + + + + + + 5942 + + + + + 5943 + + + YES + + + + + + 5944 + + + + + 5945 + + + YES + + + + + + 5946 + + + YES + + + + + + 5947 + + + YES + + + + + + + + 5948 + + + + + 5949 + + + + + 5950 + + + + + 5951 + + + YES + + + + + + 5952 + + + YES + + + + + + 5953 + + + YES + + + + + + + + 5954 + + + + + 5955 + + + + + 5956 + + + + + 5957 + + + YES + + + + + + 5958 + + + YES + + + + + + 5959 + + + YES + + + + + + + + 5960 + + + + + 5961 + + + + + 5962 + + + + + 5963 + + + YES + + + + + + 5964 + + + + + 5967 + + + YES + + + + + + 5968 + + + + + 5971 + + + YES + + + + + + 5972 + + + + + 5981 + + + YES + + + + + + 5982 + + + + + 5992 + + + YES + + + + + + 5993 + + + + + 5996 + + + YES + + + + + + 5997 + + + @@ -10511,6 +11488,47 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 5922.IBPluginDependency 5923.IBPluginDependency 5924.IBPluginDependency + 5932.IBPluginDependency + 5933.IBPluginDependency + 5934.IBPluginDependency + 5937.IBPluginDependency + 5938.IBPluginDependency + 5939.IBPluginDependency + 5940.IBPluginDependency + 5941.IBPluginDependency + 5942.IBPluginDependency + 5943.IBPluginDependency + 5944.IBPluginDependency + 5945.IBPluginDependency + 5946.IBPluginDependency + 5947.IBPluginDependency + 5948.IBPluginDependency + 5949.IBPluginDependency + 5950.IBPluginDependency + 5951.IBPluginDependency + 5952.IBPluginDependency + 5953.IBPluginDependency + 5954.IBPluginDependency + 5955.IBPluginDependency + 5956.IBPluginDependency + 5957.IBPluginDependency + 5958.IBPluginDependency + 5959.IBPluginDependency + 5960.IBPluginDependency + 5961.IBPluginDependency + 5962.IBPluginDependency + 5963.IBPluginDependency + 5964.IBPluginDependency + 5967.IBPluginDependency + 5968.IBPluginDependency + 5971.IBPluginDependency + 5972.IBPluginDependency + 5981.IBPluginDependency + 5982.IBPluginDependency + 5992.IBPluginDependency + 5993.IBPluginDependency + 5996.IBPluginDependency + 5997.IBPluginDependency 970.IBPluginDependency 971.IBPluginDependency 973.IBPluginDependency @@ -10965,6 +11983,47 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -10979,7 +12038,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - 5931 + 6003 @@ -11026,6 +12085,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA customSettingUsed: deleteFactoryPresets: deletePreset: + enableX264PresetWidgets: encodeStartStopPopUpChanged: formatPopUpChanged: getDefaultPresets: @@ -11039,6 +12099,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA selectDefaultPreset: selectPreset: setDefaultPreset: + setupX264PresetsWidgets: showAboutPanel: showAddPresetPanel: showDebugOutputPanel: @@ -11055,6 +12116,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA videoEncoderPopUpChanged: videoFrameRateChanged: videoMatrixChanged: + x264PresetsChangedDisplayExpandedOptions: + x264PresetsSetJobVariables: + x264PresetsSliderChanged: YES @@ -11114,6 +12178,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA id id id + id + id + id + id + id @@ -11147,6 +12216,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA customSettingUsed: deleteFactoryPresets: deletePreset: + enableX264PresetWidgets: encodeStartStopPopUpChanged: formatPopUpChanged: getDefaultPresets: @@ -11160,6 +12230,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA selectDefaultPreset: selectPreset: setDefaultPreset: + setupX264PresetsWidgets: showAboutPanel: showAddPresetPanel: showDebugOutputPanel: @@ -11176,6 +12247,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA videoEncoderPopUpChanged: videoFrameRateChanged: videoMatrixChanged: + x264PresetsChangedDisplayExpandedOptions: + x264PresetsSetJobVariables: + x264PresetsSliderChanged: YES @@ -11287,6 +12361,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA deletePreset: id + + enableX264PresetWidgets: + id + encodeStartStopPopUpChanged: id @@ -11339,6 +12417,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA setDefaultPreset: id + + setupX264PresetsWidgets: + id + showAboutPanel: id @@ -11403,6 +12485,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA videoMatrixChanged: id + + x264PresetsChangedDisplayExpandedOptions: + id + + + x264PresetsSetJobVariables: + id + + + x264PresetsSliderChanged: + id + @@ -11417,11 +12511,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fAudioAllowDTSPassCheck fAudioAllowMP3PassCheck fAudioAutoPassthruBox + fAudioDelegate fAudioFallbackPopUp fBrowseSrtFileButton fChapterTable fChapterTableNameColumn fCreateChapterMarkers + fDisplayX264PresetsAdditonalOptionsLabel + fDisplayX264PresetsAdditonalOptionsTextField + fDisplayX264PresetsUnparseTextField fDstBrowseButton fDstFile1Field fDstFile2Field @@ -11497,6 +12595,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fVidTwoPassCheck fVideoFiltersField fWindow + fX264FastDecodeCheck + fX264LevelPopUp + fX264LevelPopUpLabel + fX264PresetSelectedTextField + fX264PresetSliderLabel + fX264PresetsBox + fX264PresetsSlider + fX264ProfilePopUp + fX264ProfilePopUpLabel + fX264TunePopUp + fX264TunePopUpLabel + fx264UseAdvancedOptionsCheck YES @@ -11508,11 +12618,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA NSButton NSButton NSBox + HBAudioController NSButton NSButton NSTableView NSTableColumn NSButton + NSTextField + NSTextField + NSTextField NSButton NSTextField NSTextField @@ -11588,6 +12702,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA NSButton NSTextField NSWindow + NSButton + NSPopUpButton + NSTextField + NSTextField + NSTextField + NSBox + NSSlider + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSButton @@ -11602,11 +12728,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fAudioAllowDTSPassCheck fAudioAllowMP3PassCheck fAudioAutoPassthruBox + fAudioDelegate fAudioFallbackPopUp fBrowseSrtFileButton fChapterTable fChapterTableNameColumn fCreateChapterMarkers + fDisplayX264PresetsAdditonalOptionsLabel + fDisplayX264PresetsAdditonalOptionsTextField + fDisplayX264PresetsUnparseTextField fDstBrowseButton fDstFile1Field fDstFile2Field @@ -11682,6 +12812,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fVidTwoPassCheck fVideoFiltersField fWindow + fX264FastDecodeCheck + fX264LevelPopUp + fX264LevelPopUpLabel + fX264PresetSelectedTextField + fX264PresetSliderLabel + fX264PresetsBox + fX264PresetsSlider + fX264ProfilePopUp + fX264ProfilePopUpLabel + fX264TunePopUp + fX264TunePopUpLabel + fx264UseAdvancedOptionsCheck YES @@ -11717,6 +12859,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fAudioAutoPassthruBox NSBox + + fAudioDelegate + HBAudioController + fAudioFallbackPopUp NSButton @@ -11737,6 +12883,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fCreateChapterMarkers NSButton + + fDisplayX264PresetsAdditonalOptionsLabel + NSTextField + + + fDisplayX264PresetsAdditonalOptionsTextField + NSTextField + + + fDisplayX264PresetsUnparseTextField + NSTextField + fDstBrowseButton NSButton @@ -12037,6 +13195,54 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA fWindow NSWindow + + fX264FastDecodeCheck + NSButton + + + fX264LevelPopUp + NSPopUpButton + + + fX264LevelPopUpLabel + NSTextField + + + fX264PresetSelectedTextField + NSTextField + + + fX264PresetSliderLabel + NSTextField + + + fX264PresetsBox + NSBox + + + fX264PresetsSlider + NSSlider + + + fX264ProfilePopUp + NSPopUpButton + + + fX264ProfilePopUpLabel + NSTextField + + + fX264TunePopUp + NSPopUpButton + + + fX264TunePopUpLabel + NSTextField + + + fx264UseAdvancedOptionsCheck + NSButton + @@ -12113,8 +13319,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {128, 128} {15, 15} {8, 8} - {9, 8} - {7, 2} + {11, 11} + {10, 3} {8, 8} {15, 15} diff --git a/macosx/English.lproj/OutputPanel.xib b/macosx/English.lproj/OutputPanel.xib index b3328dc71..64029f65d 100644 --- a/macosx/English.lproj/OutputPanel.xib +++ b/macosx/English.lproj/OutputPanel.xib @@ -1,28 +1,33 @@ - + 1050 - 9G55 - 677 - 949.43 - 353.00 - + 11G63 + 1938 + 1138.51 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + YES - - + NSView + NSMenu + NSScrollView + NSWindowTemplate + NSMenuItem + NSTextView + NSScroller + NSCustomObject YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -45,8 +50,8 @@ View - {3.40282e+38, 3.40282e+38} - {214.502, 107} + + {214.50200000000001, 107} 256 @@ -83,22 +88,20 @@ - 3.630000e+02 + 363 1 11109 + 0 + 3 MQA - - 3 - MAA - YES - + YES NSBackgroundColor NSColor @@ -111,21 +114,24 @@ selectedTextBackgroundColor 3 - MC42NjY2NjY2OQA + MC42NjY2NjY2NjY3AA 6 System selectedTextColor - + + 3 + MAA + - + YES - + YES NSColor NSUnderline @@ -136,13 +142,15 @@ 1 MCAwIDEAA - + + + 1 6 - {743, 1e+07} + {743, 10000000} {83, 0} @@ -153,8 +161,30 @@ - {4, -5} - 1 + {4, 5} + + 12582912 + + YES + + YES + + + + TU0AKgAAAHCAFUqgBVKsAAAAwdVQUqwaEQeIRGJRGFlYqwWLQ+JxuOQpVRmEx2RROKwOQyOUQSPyaUym +SxqWyKXyeYxyZzWbSuJTScRCbz2Nz+gRKhUOfTqeUai0OSxiWTiBQSHSGFquGwekxyAgAAAOAQAAAwAA +AAEAEAAAAQEAAwAAAAEAEAAAAQIAAwAAAAIACAAIAQMAAwAAAAEABQAAAQYAAwAAAAEAAQAAAREABAAA +AAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAgAAARYAAwAAAAEAEAAAARcABAAAAAEAAABnARwAAwAA +AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + + + + + + 3 + MCAwAA + + 4 @@ -165,24 +195,24 @@ _doScroller: - 6.003236e-01 + 0.60032359999999996 - 256 + -2147483392 {{-100, -100}, {87, 18}} 1 _doScroller: - 1.000000e+00 - 9.456522e-01 + 1 + 0.94565220000000005 {{-1, -1}, {380, 373}} - 18 + 133138 @@ -192,9 +222,10 @@ {378, 371} - {{0, 0}, {1920, 1178}} - {214.502, 129} - {3.40282e+38, 3.40282e+38} + {{0, 0}, {1440, 878}} + {214.50200000000001, 129} + {10000000000000, 10000000000000} + YES Menu @@ -280,30 +311,6 @@ YES - - - delegate - - - - 17 - - - - delegate - - - - 21 - - - - menu - - - - 22 - textView @@ -360,6 +367,30 @@ 44 + + + delegate + + + + 17 + + + + delegate + + + + 21 + + + + menu + + + + 22 + @@ -376,7 +407,7 @@ -2 - RmlsZSdzIE93bmVyA + File's Owner -1 @@ -490,174 +521,92 @@ YES - + YES -1.IBPluginDependency -2.IBPluginDependency -3.IBPluginDependency - -3.ImportedFromIB2 - 11.IBEditorWindowLastContentRect 11.IBPluginDependency - 11.ImportedFromIB2 12.IBPluginDependency - 12.ImportedFromIB2 19.IBPluginDependency - 19.ImportedFromIB2 20.IBPluginDependency - 20.ImportedFromIB2 24.IBPluginDependency - 24.ImportedFromIB2 33.IBPluginDependency - 33.ImportedFromIB2 35.IBPluginDependency - 35.ImportedFromIB2 37.IBPluginDependency - 37.ImportedFromIB2 39.IBPluginDependency 39.IBShouldRemoveOnLegacySave 40.IBPluginDependency 40.IBShouldRemoveOnLegacySave 42.IBPluginDependency - 42.ImportedFromIB2 43.IBPluginDependency - 43.ImportedFromIB2 - 5.IBEditorWindowLastContentRect + 5.IBPluginDependency 5.IBWindowTemplateEditedContentRect - 5.ImportedFromIB2 - 5.windowTemplate.hasMaxSize - 5.windowTemplate.hasMinSize - 5.windowTemplate.maxSize - 5.windowTemplate.minSize 6.IBPluginDependency - 6.ImportedFromIB2 YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - {{319, 676}, {300, 123}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{597, 246}, {378, 371}} {{597, 246}, {378, 371}} - - - - {3.40282e+38, 3.40282e+38} - {214.502, 107} com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - - YES - + + YES - - YES - - - YES - + + 44 - - + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + YES - - FirstResponder - NSObject - - IBUserSource - - - - - HBOutputPanelController - NSWindowController - - YES - - YES - clearActivityLogFile: - clearOutput: - copyAllOutputToPasteboard: - openActivityLogFile: - openEncodeLogDirectory: - showOutputPanel: - - - YES - id - id - id - id - id - id - - - - textView - NSTextView - - - IBProjectSource - HBOutputPanelController.h - - - - HBOutputPanelController - NSWindowController - - IBUserSource - - - - - NSObject - - IBUserSource - - - + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} - 0 - ../HandBrake.xcodeproj - 3 diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index 6add5ab90..b2f4c2100 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -1319,19 +1319,64 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; [finalString appendString: videoInfo withAttributes:detailAttr]; [finalString appendString:@"\n" withAttributes:detailAttr]; + // x264 options (for now either the x264 presets panel or the hb x264 advanced panel if ([[item objectForKey:@"VideoEncoder"] isEqualToString: @"H.264 (x264)"]) { - [finalString appendString: @"x264 Options: " withAttributes:detailBoldAttr]; - if ([item objectForKey:@"x264Option"]) + // check to see if we are using a x264 preset, if so concatenate the display of presets, tunes , etc. + if ([item objectForKey:@"x264Preset"]) { - [finalString appendString: [item objectForKey:@"x264Option"] withAttributes:detailAttr]; + [finalString appendString: @"x264 Presets: " withAttributes:detailBoldAttr]; + NSString * x264PresetsInfo = @""; + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Preset:%@ - ",[item objectForKey:@"x264Preset"]]]; + if ([item objectForKey:@"x264Tune"]) + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Tune:%@ - ",[item objectForKey:@"x264Tune"]]]; + } + else + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Tune:none - "]]; + } + if ([item objectForKey:@"x264Option"]) + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Additional Options:%@ - ",[item objectForKey:@"x264AdditionalOptions"]]]; + } + if ([item objectForKey:@"h264Profile"]) + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Profile:%@ - ",[item objectForKey:@"h264Profile"]]]; + } + else + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Profile:auto - "]]; + } + if ([item objectForKey:@"h264Level"]) + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Level:%@",[item objectForKey:@"h264Level"]]]; + } + else + { + x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Level:auto"]]; + } + + [finalString appendString: x264PresetsInfo withAttributes:detailAttr]; + } - else + else /// we are using the HB Advanced Panel { - [finalString appendString: @"x264 defaults" withAttributes:detailAttr]; + [finalString appendString: @"x264 Advanced Options: " withAttributes:detailBoldAttr]; + if ([item objectForKey:@"x264Option"]) + { + [finalString appendString: [item objectForKey:@"x264Option"] withAttributes:detailAttr]; + } + else + { + [finalString appendString: @"x264 defaults" withAttributes:detailAttr]; + } + } + [finalString appendString:@"\n" withAttributes:detailAttr]; } + /*If we are not x264 and we are not Theora then we must be FFmpeg (lavc) */ else if (![[item objectForKey:@"VideoEncoder"] isEqualToString: @"VP3 (Theora)"]) { -- cgit v1.2.3