summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-05-15 19:11:17 +0000
committerjbrjake <[email protected]>2007-05-15 19:11:17 +0000
commit2cf831aa6215005f9e151398672735555acd0e8b (patch)
treeb5c49cd3dd493f3dbc1e9453ebd607518f8e81ad /macosx
parent51eb216f691cf5dd1592efa578462ff5cded5068 (diff)
MacGui: x264 options widget for motion estimation. This is the first widget to use strings for values instead of numbers, so it's a little wonky. Right now, if you don't have a motion est. value specified, but you do have another option with "me" in the name (like "subME" or "b-fraMEs"), the widget will be unresponsive.
Hopefully I'm not accidentally breaking anything with this commit. Had to revert, update, and rewire some stuff after I tried to commit and realized I'd missed a revision. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@582 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.h6
-rw-r--r--macosx/Controller.mm125
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib2
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib5
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin117541 -> 119535 bytes
5 files changed, 129 insertions, 9 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index 44a1d36f1..c2459ec71 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -152,9 +152,11 @@
IBOutlet NSPopUpButton * fX264optSubmePopUp;
IBOutlet NSTextField * fX264optTrellisLabel;
IBOutlet NSPopUpButton * fX264optTrellisPopUp;
- IBOutlet NSTextField * fX264optMixedRefsLabel;
+ IBOutlet NSTextField * fX264optMixedRefsLabel;
IBOutlet NSPopUpButton * fX264optMixedRefsPopUp;
-
+ IBOutlet NSTextField * fX264optMotionEstLabel;
+ IBOutlet NSPopUpButton * fX264optMotionEstPopUp;
+
/* User Preset variables here fPresetNewPicSettingsApply*/
IBOutlet NSDrawer * fPresetDrawer;
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index cf0ca518e..58c9750c0 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -648,7 +648,8 @@ return registrationDictionary;
fCreateChapterMarkers,fX264optViewTitleLabel,fDisplayX264Options,fDisplayX264OptionsLabel,fX264optBframesLabel,
fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipPopUp,
fX264optNodctdcmtLabel,fX264optNodctdcmtPopUp,fX264optSubmeLabel,fX264optSubmePopUp,
- fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsPopUp};
+ fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsPopUp,
+ fX264optMotionEstLabel,fX264optMotionEstPopUp};
for( unsigned i = 0;
i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -1964,6 +1965,14 @@ the user is using "Custom" settings by determining the sender*/
}
}
+ /*Motion Estimation fX264optMotionEstPopUp*/
+ [fX264optMotionEstPopUp removeAllItems];
+ [fX264optMotionEstPopUp addItemWithTitle:@"Default (Hexagon)"];
+ [fX264optMotionEstPopUp addItemWithTitle:@"Diamond"];
+ [fX264optMotionEstPopUp addItemWithTitle:@"Hexagon"];
+ [fX264optMotionEstPopUp addItemWithTitle:@"Uneven Multi-Hexagon"];
+ [fX264optMotionEstPopUp addItemWithTitle:@"Exhaustive"];
+
/* Standardize the option string */
[self X264AdvancedOptionsStandardizeOptString: NULL];
/* Set Current GUI Settings based on newly standardized string */
@@ -2134,6 +2143,18 @@ the user is using "Custom" settings by determining the sender*/
{
[fX264optMixedRefsPopUp selectItemAtIndex:[optValue intValue]+1];
}
+ /*Motion Estimation NSPopUpButton*/
+ if ([optName isEqualToString:@"me"])
+ {
+ if ([optValue isEqualToString:@"dia"])
+ [fX264optMotionEstPopUp selectItemAtIndex:1];
+ else if ([optValue isEqualToString:@"hex"])
+ [fX264optMotionEstPopUp selectItemAtIndex:2];
+ else if ([optValue isEqualToString:@"umh"])
+ [fX264optMotionEstPopUp selectItemAtIndex:3];
+ else if ([optValue isEqualToString:@"esa"])
+ [fX264optMotionEstPopUp selectItemAtIndex:4];
+ }
}
}
}
@@ -2172,6 +2193,10 @@ the user is using "Custom" settings by determining the sender*/
{
optNameToChange = @"mixed-refs";
}
+ if (sender == fX264optMotionEstPopUp)
+ {
+ optNameToChange = @"me";
+ }
/* Set widgets depending on the opt string in field */
NSString * thisOpt; // The separated option such as "bframes=3"
@@ -2219,6 +2244,30 @@ the user is using "Custom" settings by determining the sender*/
{
thisOpt = @"";
}
+ else if ([optNameToChange isEqualToString:@"me"])
+ {
+ switch ([sender indexOfSelectedItem])
+ {
+ case 1:
+ thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"dia"];
+ break;
+
+ case 2:
+ thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"hex"];
+ break;
+
+ case 3:
+ thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"umh"];
+ break;
+
+ case 4:
+ thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"esa"];
+ break;
+
+ default:
+ break;
+ }
+ }
else // we have a valid value to change, so change it
{
thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1];
@@ -2251,13 +2300,79 @@ the user is using "Custom" settings by determining the sender*/
{
if ([[fDisplayX264Options stringValue] isEqualToString: @""])
{
- [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
- [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+ if ([optNameToChange isEqualToString:@"me"])
+ {
+ switch ([sender indexOfSelectedItem])
+ {
+ case 1:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"dia"]]];
+ break;
+
+ case 2:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"hex"]]];
+ break;
+
+ case 3:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"umh"]]];
+ break;
+
+ case 4:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"esa"]]];
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+ }
}
else
{
- [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],
- [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+ if ([optNameToChange isEqualToString:@"me"])
+ {
+ switch ([sender indexOfSelectedItem])
+ {
+ case 1:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",
+ [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"dia"]]];
+ break;
+
+ case 2:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",
+ [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"hex"]]];
+ break;
+
+ case 3:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",
+ [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"umh"]]];
+ break;
+
+ case 4:
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",
+ [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"esa"]]];
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+ }
}
}
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 838479e4a..180416161 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -140,6 +140,8 @@
fX264optBframesPopUp = NSPopUpButton;
fX264optMixedRefsLabel = NSTextField;
fX264optMixedRefsPopUp = NSPopUpButton;
+ fX264optMotionEstLabel = NSTextField;
+ fX264optMotionEstPopUp = NSPopUpButton;
fX264optNfpskipLabel = NSTextField;
fX264optNfpskipPopUp = NSPopUpButton;
fX264optNodctdcmtLabel = NSTextField;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index a58685983..8d46dd189 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -7,7 +7,7 @@
<key>IBEditorPositions</key>
<dict>
<key>1843</key>
- <string>610 276 220 592 0 0 1440 878 </string>
+ <string>863 409 220 592 0 0 1920 1058 </string>
<key>29</key>
<string>1793 762 365 44 1440 0 1280 1024 </string>
</dict>
@@ -19,10 +19,11 @@
</array>
<key>IBOpenObjects</key>
<array>
+ <integer>21</integer>
<integer>1843</integer>
</array>
<key>IBSystem Version</key>
- <string>8P2137</string>
+ <string>8L127</string>
<key>IBUserGuides</key>
<dict>
<key>21</key>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index b8fb3f3be..213b025c2 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ