diff options
-rw-r--r-- | macosx/Controller.h | 4 | ||||
-rw-r--r-- | macosx/Controller.mm | 30 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/classes.nib | 6 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/info.nib | 5 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/keyedobjects.nib | bin | 129127 -> 130562 bytes | |||
-rw-r--r-- | macosx/PictureController.h | 4 | ||||
-rw-r--r-- | macosx/PictureController.mm | 35 |
7 files changed, 79 insertions, 5 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index c415f98b6..68df8913b 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -99,6 +99,9 @@ IBOutlet NSTextField * fPicSettingAutoCrop; IBOutlet NSTextField * fPicSettingAutoCropDsply; IBOutlet NSTextField * fPicSettingDeinterlaceDsply; + IBOutlet NSTextField * fPicSettingDetelecine; + IBOutlet NSTextField * fPicSettingDetelecineLabel; + IBOutlet NSTextField * fPicLabelAnamorphic; IBOutlet NSTextField * fPicLabelPAROutp; IBOutlet NSTextField * fPicLabelPAROutputX; @@ -245,6 +248,7 @@ - (IBAction) CodecsPopUpChanged: (id) sender; - (IBAction) EncoderPopUpChanged: (id) sender; - (IBAction) TwoPassCheckboxChanged: (id) sender; +- (IBAction ) VideoFrameRateChanged: (id) sender; - (IBAction) SetEnabledStateOfAudioMixdownControls: (id) sender; - (IBAction) AddAllAudioTracksToPopUp: (id) sender; - (IBAction) SelectAudioTrackInPopUp: (id) sender searchPrefixString: (NSString *) searchPrefixString selectIndexIfNotFound: (int) selectIndexIfNotFound; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 964254c0c..2c59450b0 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -263,7 +263,10 @@ static NSString* ChooseSourceIdentifier = @"Choose Source Item Identifie [fPicSettingPARWidth setStringValue: @""]; [fPicSettingPARHeight setStringValue: @""]; - /* Audio bitrate */ + /*Set detelecine to Off upon launch */ + [fPicSettingDetelecine setStringValue: @"No"]; + + /* Audio bitrate */ [fAudBitratePopUp removeAllItems]; for( int i = 0; i < hb_audio_bitrates_count; i++ ) { @@ -1082,7 +1085,7 @@ list = hb_get_titles( fHandle ); fX264optDirectPredLabel,fX264optDirectPredPopUp,fX264optDeblockLabel,fX264optAnalyseLabel, fX264optAnalysePopUp,fX264opt8x8dctLabel,fX264opt8x8dctSwitch,fX264optCabacLabel,fX264optCabacSwitch, fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp,fVidTurboPassCheck,fDstMpgLargeFileCheck,fPicSettingAutoCropLabel, - fPicSettingAutoCropDsply}; + fPicSettingAutoCropDsply,fPicSettingDetelecine,fPicSettingDetelecineLabel}; for( unsigned i = 0; i < sizeof( controls ) / sizeof( NSControl * ); i++ ) @@ -1409,6 +1412,13 @@ list = hb_get_titles( fHandle ); } job->filters = hb_list_init(); + /* Detelecine */ + if ([[fPicSettingDetelecine stringValue] isEqualToString: @"Yes"]) + { + hb_list_add( job->filters, &hb_filter_detelecine ); + } + + /* Deinterlace */ if( job->deinterlace == 1) { if ([fPicSettingDeinterlace intValue] == 1) @@ -2000,6 +2010,15 @@ list = hb_get_titles( fHandle ); [self CustomSettingUsed: sender]; } +- (IBAction ) VideoFrameRateChanged: (id) sender +{ +/* We call method method to CalculatePictureSizing to error check detelecine*/ +[self CalculatePictureSizing: sender]; + +/* We call method method to change UI to reflect whether a preset is used or not*/ + [self CustomSettingUsed: sender]; +} + - (IBAction) SetEnabledStateOfAudioMixdownControls: (id) sender { @@ -2468,6 +2487,13 @@ list = hb_get_titles( fHandle ); { [fPicSettingAutoCropDsply setStringValue: @"Auto"]; } + /* check video framerate and turn off detelecine if necessary */ + if (fTitle->rate_base == 1126125 || [[fVidRatePopUp titleOfSelectedItem] isEqualToString: @"23.976 (NTSC Film)"]) + { + [fPicSettingDetelecine setStringValue: @"No"]; + } + + /* below will trigger the preset, if selected, to be changed to "Custom". Lets comment out for now until diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib index 56978b1c7..0fb334d92 100644 --- a/macosx/English.lproj/MainMenu.nib/classes.nib +++ b/macosx/English.lproj/MainMenu.nib/classes.nib @@ -39,6 +39,7 @@ ShowScanPanel = id; TitlePopUpChanged = id; TwoPassCheckboxChanged = id; + VideoFrameRateChanged = id; VideoMatrixChanged = id; X264AdvancedOptionsChanged = id; X264AdvancedOptionsSet = id; @@ -94,6 +95,8 @@ fPicSettingAutoCropLabel = NSTextField; fPicSettingDeinterlace = NSTextField; fPicSettingDeinterlaceDsply = NSTextField; + fPicSettingDetelecine = NSTextField; + fPicSettingDetelecineLabel = NSTextField; fPicSettingHeight = NSTextField; fPicSettingPAR = NSTextField; fPicSettingPARDsply = NSTextField; @@ -229,6 +232,8 @@ fCropTopStepper = NSStepper; fDeinterlaceLevelMainWindow = NSTextField; fDeinterlacePopUp = NSPopUpButton; + fDetelecineCheck = NSButton; + fDetelecineMainWindow = NSTextField; fEffectsCheck = NSButton; fHeightField = NSTextField; fHeightStepper = NSStepper; @@ -245,6 +250,7 @@ fPictureGLView = HBPictureGLView; fPrevButton = NSButton; fRatioCheck = NSButton; + fVidFrameRatePopUpMainWindow = NSPopUpButton; fWidthField = NSTextField; fWidthStepper = NSStepper; }; diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index fb661e2d8..9d18815dc 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>IBDocumentLocation</key> - <string>87 46 558 375 0 0 1440 878 </string> + <string>-2 463 763 415 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> <key>1843</key> @@ -28,9 +28,8 @@ <key>IBOpenObjects</key> <array> <integer>2436</integer> + <integer>365</integer> <integer>21</integer> - <integer>29</integer> - <integer>1843</integer> </array> <key>IBSystem Version</key> <string>8R2218</string> diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib Binary files differindex e6539fd7b..a4fcb87b5 100644 --- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib +++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib diff --git a/macosx/PictureController.h b/macosx/PictureController.h index b7c93c79d..5e876b555 100644 --- a/macosx/PictureController.h +++ b/macosx/PictureController.h @@ -37,6 +37,7 @@ IBOutlet NSTextField * fCropRightField; IBOutlet NSStepper * fCropRightStepper; IBOutlet NSPopUpButton * fDeinterlacePopUp; + IBOutlet NSButton * fDetelecineCheck; IBOutlet NSButton * fPARCheck; IBOutlet NSButton * fEffectsCheck; IBOutlet NSButton * fPrevButton; @@ -51,6 +52,9 @@ /* widgets in main window */ IBOutlet NSTextField * fAutoCropMainWindow; IBOutlet NSTextField * fDeinterlaceLevelMainWindow; + IBOutlet NSTextField * fDetelecineMainWindow; + IBOutlet NSPopUpButton * fVidFrameRatePopUpMainWindow; + } diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm index afdb6f6cc..0cf80da05 100644 --- a/macosx/PictureController.mm +++ b/macosx/PictureController.mm @@ -117,6 +117,31 @@ static int GetAlignedSize( int size ) { [fCropMatrix selectCellAtRow: 0 column:0]; } + + /* set the detelecine state according to the state in main window */ + /* if framerate is 23.976 we do not allow detelecine, otherwise, enable and set according to fDetelecineMainWindow outlet */ + if (fTitle->rate_base == 1126125 || [[fVidFrameRatePopUpMainWindow titleOfSelectedItem] isEqualToString: @"23.976 (NTSC Film)"]) + { + [fDetelecineMainWindow setStringValue: @"No"]; + [fDetelecineCheck setEnabled: NO]; + [fDetelecineCheck setState: NSOffState]; + + } + else + { + [fDetelecineCheck setEnabled: YES]; + if ([[fDetelecineMainWindow stringValue] isEqualToString: @"Yes"]) + { + [fDetelecineCheck setState: NSOnState]; + } + else + { + [fDetelecineCheck setState: NSOffState]; + } + + } + + MaxOutputWidth = job->width; MaxOutputHeight = job->height; fPicture = 0; @@ -245,6 +270,16 @@ static int GetAlignedSize( int size ) job->deinterlace = 1; } + /* set the detelecine state according to the integer set in the main window field */ + if ([fDetelecineCheck state] == 1) + { + [fDetelecineMainWindow setStringValue: @"Yes"]; + } + else + { + [fDetelecineMainWindow setStringValue: @"No"]; + } + job->pixel_ratio = ( [fPARCheck state] == NSOnState ); |