]> granicus.if.org Git - handbrake/commitdiff
MacGui: VFR controls initial implementation
authordynaflash <dynaflashtech@gmail.com>
Sat, 10 Nov 2007 02:00:46 +0000 (02:00 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Sat, 10 Nov 2007 02:00:46 +0000 (02:00 +0000)
- 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

macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
macosx/English.lproj/PictureSettings.nib/classes.nib
macosx/English.lproj/PictureSettings.nib/info.nib
macosx/English.lproj/PictureSettings.nib/keyedobjects.nib
macosx/PictureController.h
macosx/PictureController.mm

index 7b7e74c5fa512414379bf33ee59b7e02a1384609..0f84c8df83d1e6a8ec8b2a491831f0951c5d63de 100644 (file)
@@ -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)
index 5327c4cda6c5a891697143230f1afd34ad9f1192..b33842abe23ed0c7ff7fdea09ce2d1cd94ce0feb 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 7f70da0e6622e70002b136ce9dc6a66135c38f06..cfecb9ddbcd8006e58402cf22c9a409b0a2565e1 100644 (file)
@@ -38,6 +38,7 @@
                 fPicturePanel = NSPanel; 
                 fPrevButton = NSButton; 
                 fRatioCheck = NSButton; 
+                fVFRCheck = NSButton; 
                 fWidthField = NSTextField; 
                 fWidthStepper = NSStepper; 
             }; 
index 332e5df0aab218d382a897d0394dc9c75a6e7fdc..2f049637aceae96324a55e46c0cf79e92b52d7ca 100644 (file)
@@ -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>
index f8570e07fbee5a032caaa69de147a91a0499e942..a3cac2a7f8a4813a8512079d0b42205a8a980421 100644 (file)
Binary files a/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib and b/macosx/English.lproj/PictureSettings.nib/keyedobjects.nib differ
index 62e78af4a2ae65868e54bf298d8bf2688ad541e2..ff1267b8e9f0593e2a1e466629217ac47e06ab03 100644 (file)
@@ -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;
index 640479b65cb9436d8e5a06b08cd9231c15d00067..80952edf627184626d2e820e01890c090adb7fc1 100644 (file)
@@ -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;