IBOutlet NSTextField * fPicSettingAutoCrop;
IBOutlet NSTextField * fPicSettingAutoCropDsply;
IBOutlet NSTextField * fPicSettingDeinterlaceDsply;
+ IBOutlet NSTextField * fPicSettingDetelecine;
+ IBOutlet NSTextField * fPicSettingDetelecineLabel;
+
IBOutlet NSTextField * fPicLabelAnamorphic;
IBOutlet NSTextField * fPicLabelPAROutp;
IBOutlet NSTextField * fPicLabelPAROutputX;
- (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;
[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++ )
{
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++ )
}
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)
[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
{
{
[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
ShowScanPanel = id;
TitlePopUpChanged = id;
TwoPassCheckboxChanged = id;
+ VideoFrameRateChanged = id;
VideoMatrixChanged = id;
X264AdvancedOptionsChanged = id;
X264AdvancedOptionsSet = id;
fPicSettingAutoCropLabel = NSTextField;
fPicSettingDeinterlace = NSTextField;
fPicSettingDeinterlaceDsply = NSTextField;
+ fPicSettingDetelecine = NSTextField;
+ fPicSettingDetelecineLabel = NSTextField;
fPicSettingHeight = NSTextField;
fPicSettingPAR = NSTextField;
fPicSettingPARDsply = NSTextField;
fCropTopStepper = NSStepper;
fDeinterlaceLevelMainWindow = NSTextField;
fDeinterlacePopUp = NSPopUpButton;
+ fDetelecineCheck = NSButton;
+ fDetelecineMainWindow = NSTextField;
fEffectsCheck = NSButton;
fHeightField = NSTextField;
fHeightStepper = NSStepper;
fPictureGLView = HBPictureGLView;
fPrevButton = NSButton;
fRatioCheck = NSButton;
+ fVidFrameRatePopUpMainWindow = NSPopUpButton;
fWidthField = NSTextField;
fWidthStepper = NSStepper;
};
<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>
<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>
IBOutlet NSTextField * fCropRightField;
IBOutlet NSStepper * fCropRightStepper;
IBOutlet NSPopUpButton * fDeinterlacePopUp;
+ IBOutlet NSButton * fDetelecineCheck;
IBOutlet NSButton * fPARCheck;
IBOutlet NSButton * fEffectsCheck;
IBOutlet NSButton * fPrevButton;
/* widgets in main window */
IBOutlet NSTextField * fAutoCropMainWindow;
IBOutlet NSTextField * fDeinterlaceLevelMainWindow;
+ IBOutlet NSTextField * fDetelecineMainWindow;
+ IBOutlet NSPopUpButton * fVidFrameRatePopUpMainWindow;
+
}
{
[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;
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 );