From: dynaflash Date: Sun, 19 Feb 2012 22:14:57 +0000 (+0000) Subject: MacGui: Fix an issue where lavc options were shown and passed when Theora was chosen. X-Git-Tag: 0.9.6~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbdaabaa73fa1a371aeba3ecd802bb5e003e08bf;p=handbrake MacGui: Fix an issue where lavc options were shown and passed when Theora was chosen. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4457 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/Controller.m b/macosx/Controller.m index 7a1aa1c58..0a6322bbd 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -4803,9 +4803,19 @@ the user is using "Custom" settings by determining the sender*/ [fAdvancedOptions setHidden:NO]; [self autoSetM4vExtension: sender]; } - else // we are FFmpeg (lavc) + else // we are FFmpeg (lavc) or Theora { - [fAdvancedOptions setHidden:YES]; + [fAdvancedOptions setHidden:YES]; + + // We Are Lavc + if ([[fVidEncoderPopUp selectedItem] tag] & HB_VCODEC_FFMPEG_MASK ) + { + [fAdvancedOptions setLavcOptsEnabled:YES]; + } + else /// We are Theora + { + [fAdvancedOptions setLavcOptsEnabled:NO]; + } } diff --git a/macosx/English.lproj/AdvancedView.xib b/macosx/English.lproj/AdvancedView.xib index 84c7f91cc..1aecb3d74 100644 --- a/macosx/English.lproj/AdvancedView.xib +++ b/macosx/English.lproj/AdvancedView.xib @@ -686,7 +686,6 @@ {{4, 0}, {882, 34}} - YES -1805517311 @@ -1565,7 +1564,7 @@ 256 - {{1, 42}, {264, 17}} + {{1, 42}, {888, 17}} @@ -1586,7 +1585,6 @@ {{4, 0}, {882, 34}} - YES -1805517311 @@ -3710,6 +3708,385 @@ HBAdvancedController NSObject + + YES + + YES + X264AdvancedOptionsAnimate: + X264AdvancedOptionsChanged: + X264AdvancedOptionsSet: + X264AdvancedOptionsSetCurrentSettings: + X264AdvancedOptionsStandardizeOptString: + + + YES + id + id + id + id + id + + + + YES + + YES + X264AdvancedOptionsAnimate: + X264AdvancedOptionsChanged: + X264AdvancedOptionsSet: + X264AdvancedOptionsSetCurrentSettings: + X264AdvancedOptionsStandardizeOptString: + + + YES + + X264AdvancedOptionsAnimate: + id + + + X264AdvancedOptionsChanged: + id + + + X264AdvancedOptionsSet: + id + + + X264AdvancedOptionsSetCurrentSettings: + id + + + X264AdvancedOptionsStandardizeOptString: + id + + + + + YES + + YES + fDisplayLavcOptions + fDisplayLavcOptionsLabel + fDisplayX264Options + fDisplayX264OptionsLabel + fEmptyView + fX264opt8x8dctLabel + fX264opt8x8dctSwitch + fX264optAlphaDeblockPopUp + fX264optAnalyseLabel + fX264optAnalysePopUp + fX264optAqLabel + fX264optAqSlider + fX264optBAdaptLabel + fX264optBAdaptPopUp + fX264optBPyramidLabel + fX264optBPyramidPopUp + fX264optBetaDeblockPopUp + fX264optBframesLabel + fX264optBframesPopUp + fX264optCabacLabel + fX264optCabacSwitch + fX264optDeblockLabel + fX264optDirectPredLabel + fX264optDirectPredPopUp + fX264optMERangeLabel + fX264optMERangePopUp + fX264optMotionEstLabel + fX264optMotionEstPopUp + fX264optNodctdcmtLabel + fX264optNodctdcmtSwitch + fX264optPsyRDLabel + fX264optPsyRDSlider + fX264optPsyTrellisLabel + fX264optPsyTrellisSlider + fX264optRefLabel + fX264optRefPopUp + fX264optSubmeLabel + fX264optSubmePopUp + fX264optTrellisLabel + fX264optTrellisPopUp + fX264optView + fX264optViewTitleLabel + fX264optWeightPLabel + fX264optWeightPSwitch + + + YES + NSTextField + NSTextField + NSTextField + NSTextField + NSView + NSTextField + NSButton + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSSlider + NSTextField + NSPopUpButton + NSTextField + NSPopUpButton + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSButton + NSTextField + NSTextField + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSButton + NSTextField + NSSlider + NSTextField + NSSlider + NSTextField + NSPopUpButton + NSTextField + NSPopUpButton + NSTextField + NSPopUpButton + NSView + NSTextField + NSTextField + NSButton + + + + YES + + YES + fDisplayLavcOptions + fDisplayLavcOptionsLabel + fDisplayX264Options + fDisplayX264OptionsLabel + fEmptyView + fX264opt8x8dctLabel + fX264opt8x8dctSwitch + fX264optAlphaDeblockPopUp + fX264optAnalyseLabel + fX264optAnalysePopUp + fX264optAqLabel + fX264optAqSlider + fX264optBAdaptLabel + fX264optBAdaptPopUp + fX264optBPyramidLabel + fX264optBPyramidPopUp + fX264optBetaDeblockPopUp + fX264optBframesLabel + fX264optBframesPopUp + fX264optCabacLabel + fX264optCabacSwitch + fX264optDeblockLabel + fX264optDirectPredLabel + fX264optDirectPredPopUp + fX264optMERangeLabel + fX264optMERangePopUp + fX264optMotionEstLabel + fX264optMotionEstPopUp + fX264optNodctdcmtLabel + fX264optNodctdcmtSwitch + fX264optPsyRDLabel + fX264optPsyRDSlider + fX264optPsyTrellisLabel + fX264optPsyTrellisSlider + fX264optRefLabel + fX264optRefPopUp + fX264optSubmeLabel + fX264optSubmePopUp + fX264optTrellisLabel + fX264optTrellisPopUp + fX264optView + fX264optViewTitleLabel + fX264optWeightPLabel + fX264optWeightPSwitch + + + YES + + fDisplayLavcOptions + NSTextField + + + fDisplayLavcOptionsLabel + NSTextField + + + fDisplayX264Options + NSTextField + + + fDisplayX264OptionsLabel + NSTextField + + + fEmptyView + NSView + + + fX264opt8x8dctLabel + NSTextField + + + fX264opt8x8dctSwitch + NSButton + + + fX264optAlphaDeblockPopUp + NSPopUpButton + + + fX264optAnalyseLabel + NSTextField + + + fX264optAnalysePopUp + NSPopUpButton + + + fX264optAqLabel + NSTextField + + + fX264optAqSlider + NSSlider + + + fX264optBAdaptLabel + NSTextField + + + fX264optBAdaptPopUp + NSPopUpButton + + + fX264optBPyramidLabel + NSTextField + + + fX264optBPyramidPopUp + NSPopUpButton + + + fX264optBetaDeblockPopUp + NSPopUpButton + + + fX264optBframesLabel + NSTextField + + + fX264optBframesPopUp + NSPopUpButton + + + fX264optCabacLabel + NSTextField + + + fX264optCabacSwitch + NSButton + + + fX264optDeblockLabel + NSTextField + + + fX264optDirectPredLabel + NSTextField + + + fX264optDirectPredPopUp + NSPopUpButton + + + fX264optMERangeLabel + NSTextField + + + fX264optMERangePopUp + NSPopUpButton + + + fX264optMotionEstLabel + NSTextField + + + fX264optMotionEstPopUp + NSPopUpButton + + + fX264optNodctdcmtLabel + NSTextField + + + fX264optNodctdcmtSwitch + NSButton + + + fX264optPsyRDLabel + NSTextField + + + fX264optPsyRDSlider + NSSlider + + + fX264optPsyTrellisLabel + NSTextField + + + fX264optPsyTrellisSlider + NSSlider + + + fX264optRefLabel + NSTextField + + + fX264optRefPopUp + NSPopUpButton + + + fX264optSubmeLabel + NSTextField + + + fX264optSubmePopUp + NSPopUpButton + + + fX264optTrellisLabel + NSTextField + + + fX264optTrellisPopUp + NSPopUpButton + + + fX264optView + NSView + + + fX264optViewTitleLabel + NSTextField + + + fX264optWeightPLabel + NSTextField + + + fX264optWeightPSwitch + NSButton + + + IBProjectSource ./Classes/HBAdvancedController.h diff --git a/macosx/HBAdvancedController.h b/macosx/HBAdvancedController.h index b59746e8f..1cf1d890b 100644 --- a/macosx/HBAdvancedController.h +++ b/macosx/HBAdvancedController.h @@ -67,6 +67,7 @@ - (void) setLavcOptions: (NSString *)string; - (void) enableUI: (bool) b; - (void) setHidden: (BOOL) hide; +- (void) setLavcOptsEnabled: (BOOL) lavc; - (IBAction) X264AdvancedOptionsAnimate: (id) sender; - (IBAction) X264AdvancedOptionsSet: (id) sender; - (IBAction) X264AdvancedOptionsStandardizeOptString: (id) sender; diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m index 55da0c06b..98129613c 100644 --- a/macosx/HBAdvancedController.m +++ b/macosx/HBAdvancedController.m @@ -67,6 +67,21 @@ return; } +- (void) setLavcOptsEnabled: (BOOL) lavc +{ + if(lavc) + { + [fDisplayLavcOptions setEnabled:YES]; + [fDisplayLavcOptionsLabel setStringValue: [NSString stringWithFormat:@"Current FFmpeg Advanced Option String:"]]; + } + else + { + [fDisplayLavcOptions setEnabled:NO]; + [fDisplayLavcOptionsLabel setStringValue: [NSString stringWithFormat:@"Handbrake does not currently support Theora Options"]]; + } + return; +} + - (void) enableUI: (bool) b { unsigned i; diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index 41576e242..6c331c1f1 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -1326,7 +1326,8 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; } [finalString appendString:@"\n" withAttributes:detailAttr]; } - else // we must be ffmpeg (lavc) + /*If we are not x264 and we are not Theora then we must be FFmpeg (lavc) */ + else if (![[item objectForKey:@"VideoEncoder"] isEqualToString: @"VP3 (Theora)"]) { [finalString appendString: @"FFmpeg (lavc) Options: " withAttributes:detailBoldAttr]; if ([item objectForKey:@"lavcOption"]) @@ -1342,6 +1343,7 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; + /* Seventh Line Audio Details*/ NSEnumerator *audioDetailEnumerator = [audioDetails objectEnumerator]; NSString *anAudioDetail;