summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-11-10 02:00:46 +0000
committerdynaflash <[email protected]>2007-11-10 02:00:46 +0000
commite1c1cc4c11c79b2341c8eecd9a2dabac5a58a785 (patch)
tree61620ba50aeb0509a2e46c705f46a8ea376dc29d /macosx
parentd95e8d52105a29a03750232c47949b37dc3075dc (diff)
MacGui: VFR controls initial implementation
- Adds a vfr checkbox next to the detelecine filter in the Picture Settings Window - Tuns on detelecine and disables its checkbox - Sets Framerate in the main window to 29.967 and disables it - Sets job->vfr = 1 if vfr is checked in -prepareJob git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1052 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm29
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin68430 -> 68420 bytes
-rw-r--r--macosx/English.lproj/PictureSettings.nib/classes.nib1
-rw-r--r--macosx/English.lproj/PictureSettings.nib/info.nib2
-rw-r--r--macosx/English.lproj/PictureSettings.nib/keyedobjects.nibbin24206 -> 24625 bytes
-rw-r--r--macosx/PictureController.h6
-rw-r--r--macosx/PictureController.mm20
7 files changed, 55 insertions, 3 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 7b7e74c5f..0f84c8df8 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1404,7 +1404,17 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
job->arate = hb_audio_rates[[fAudRatePopUp
indexOfSelectedItem]].rate;
job->abitrate = [[fAudBitratePopUp selectedItem] tag];
-
+
+ /* set vfr according to the Picture Window */
+ if ([fPictureController vfr])
+ {
+ job->vfr = 1;
+ }
+ else
+ {
+ job->vfr = 0;
+ }
+
/* Filters */
job->filters = hb_list_init();
@@ -2429,6 +2439,23 @@ the user is using "Custom" settings by determining the sender*/
else {
[fPicSettingDetelecine setStringValue: @"No"];
}
+
+ /* VFR (Variable Frame Rate) */
+ if ([fPictureController vfr]) {
+ /* vfr has to set the framerate to 29.97 (ntsc video)
+ and disable the framerate popup */
+ [fVidRatePopUp selectItemAtIndex: 8];
+ [fVidRatePopUp setEnabled: NO];
+ /* We change the string of the fps popup to warn that vfr is on Framerate (FPS): */
+ [fVidRateField setStringValue: @"Framerate (VFR On):"];
+
+ }
+ else {
+ /* vfr is off, make sure the framerate popup is enabled */
+ [fVidRatePopUp setEnabled: YES];
+ /* and make sure the label for framerate is set to its default */
+ [fVidRateField setStringValue: @"Framerate (FPS):"];
+ }
/* Deinterlace */
if ([fPictureController deinterlace] == 0)
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index 5327c4cda..b33842abe 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/English.lproj/PictureSettings.nib/classes.nib b/macosx/English.lproj/PictureSettings.nib/classes.nib
index 7f70da0e6..cfecb9ddb 100644
--- a/macosx/English.lproj/PictureSettings.nib/classes.nib
+++ b/macosx/English.lproj/PictureSettings.nib/classes.nib
@@ -38,6 +38,7 @@
fPicturePanel = NSPanel;
fPrevButton = NSButton;
fRatioCheck = NSButton;
+ fVFRCheck = NSButton;
fWidthField = NSTextField;
fWidthStepper = NSStepper;
};
diff --git a/macosx/English.lproj/PictureSettings.nib/info.nib b/macosx/English.lproj/PictureSettings.nib/info.nib
index 332e5df0a..2f049637a 100644
--- a/macosx/English.lproj/PictureSettings.nib/info.nib
+++ b/macosx/English.lproj/PictureSettings.nib/info.nib
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>496 129 356 240 0 0 1440 878 </string>
+ <string>45 380 356 240 0 0 1440 878 </string>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
diff --git a/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib b/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib
index f8570e07f..a3cac2a7f 100644
--- a/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib
+++ b/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index 62e78af4a..ff1267b8e 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -41,6 +41,7 @@
IBOutlet NSStepper * fCropRightStepper;
IBOutlet NSPopUpButton * fDeinterlacePopUp;
IBOutlet NSButton * fDetelecineCheck;
+ IBOutlet NSButton * fVFRCheck;
IBOutlet NSButton * fDeblockCheck;
IBOutlet NSPopUpButton * fDenoisePopUp;
IBOutlet NSButton * fPARCheck;
@@ -60,7 +61,8 @@
BOOL keepAspectRatioPreviousState;
struct {
- int detelecine;
+ int detelecine;
+ int vfr;
int deinterlace;
int denoise;
int deblock;
@@ -84,6 +86,8 @@
- (int) detelecine;
- (void) setDetelecine: (int) setting;
+- (int) vfr;
+- (void) setVFR: (int) setting;
- (int) deinterlace;
- (void) setDeinterlace: (int) setting;
- (int) denoise;
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index 640479b65..80952edf6 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -305,6 +305,16 @@ static int GetAlignedSize( int size )
job->deinterlace = 0;
}
fPictureFilterSettings.denoise = [fDenoisePopUp indexOfSelectedItem];
+ fPictureFilterSettings.vfr = [fVFRCheck state];
+ if (fPictureFilterSettings.vfr > 0)
+ {
+ [fDetelecineCheck setState:NSOnState];
+ [fDetelecineCheck setEnabled: NO];
+ }
+ else
+ {
+ [fDetelecineCheck setEnabled: YES];
+ }
fPictureFilterSettings.detelecine = [fDetelecineCheck state];
fPictureFilterSettings.deblock = [fDeblockCheck state];
job->pixel_ratio = ( [fPARCheck state] == NSOnState );
@@ -420,6 +430,16 @@ static int GetAlignedSize( int size )
fPictureFilterSettings.detelecine = setting;
}
+- (int) vfr
+{
+ return fPictureFilterSettings.vfr;
+}
+
+- (void) setVFR: (int) setting
+{
+ fPictureFilterSettings.vfr = setting;
+}
+
- (int) deinterlace
{
return fPictureFilterSettings.deinterlace;