summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-04-25 20:16:32 +0000
committerdynaflash <[email protected]>2007-04-25 20:16:32 +0000
commitc9fa0ecad7aee37b787cd09fc49c3d13fb480a84 (patch)
treefc17d1536cff0de284d7b206dc396b025b47a5f8 /macosx/Controller.mm
parent2aa8401380b0efd6b5fe488059d31ca822a483b7 (diff)
MacGui: Presets and Main Menu
- Add PSP built in preset for jbrjake ;) - Move "Presets" main menu item to the left of "Window" - Use "Update Built-In Presets" to use PSP preset. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@551 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm69
1 files changed, 68 insertions, 1 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index a9aa9bc73..ac2f6cbc7 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1839,10 +1839,11 @@ the user is using "Custom" settings by determining the sender*/
{
/* First, we delete any existing built in presets */
[self DeleteFactoryPresets: sender];
- /* Then, we re-create new built in presets programmatically CreatePS3Preset*/
+ /* Then, we re-create new built in presets programmatically CreatePSPPreset*/
[UserPresets addObject:[self CreateIpodPreset]];
[UserPresets addObject:[self CreateAppleTVPreset]];
[UserPresets addObject:[self CreatePSThreePreset]];
+ [UserPresets addObject:[self CreatePSPPreset]];
[self AddPreset];
}
- (IBAction)DeleteFactoryPresets:(id)sender
@@ -2217,6 +2218,72 @@ the user is using "Custom" settings by determining the sender*/
return preset;
}
+- (NSDictionary *)CreatePSPPreset
+{
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+ /* Get the New Preset Name from the field in the AddPresetPanel */
+ [preset setObject:@"HB-PSP" forKey:@"PresetName"];
+ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+ /*Set whether or not this is default, at creation set to 0*/
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+ /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+ /* File Format */
+ [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+ /* Chapter Markers*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+ /* Codecs */
+ [preset setObject:@"MPEG-4 Video / AAC Audio" forKey:@"FileCodecs"];
+ /* Video encoder */
+ [preset setObject:@"FFmpeg" forKey:@"VideoEncoder"];
+ /* x264 Option String (We can use this to tweak the appleTV output)*/
+ [preset setObject:@"" forKey:@"x264Option"];
+ /* Video quality */
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+ [preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
+ [preset setObject:@"1024" forKey:@"VideoAvgBitrate"];
+ [preset setObject:[NSNumber numberWithFloat:[fVidQualitySlider floatValue]] forKey:@"VideoQualitySlider"];
+
+ /* Video framerate */
+ [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+ /* GrayScale */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+ /* 2 Pass Encoding */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+ /*Picture Settings*/
+ /* For PS3 we only want to retain UsesMaxPictureSettings
+ which depend on the source dvd picture settings, so we don't
+ record the current dvd's picture info since it will vary from
+ source to source*/
+ /* Use Max Picture settings for whatever the dvd is.*/
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+ [preset setObject:@"368" forKey:@"PictureWidth"];
+ [preset setObject:@"208" forKey:@"PictureHeight"];
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+ /* Set crop settings here */
+ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+ //[preset setObject:[NSNumber numberWithInt:job->crop[0]] forKey:@"PictureTopCrop"];
+ //[preset setObject:[NSNumber numberWithInt:job->crop[1]] forKey:@"PictureBottomCrop"];
+ //[preset setObject:[NSNumber numberWithInt:job->crop[2]] forKey:@"PictureLeftCrop"];
+ //[preset setObject:[NSNumber numberWithInt:job->crop[3]] forKey:@"PictureRightCrop"];
+
+ /*Audio*/
+ /* Audio Sample Rate*/
+ [preset setObject:@"48" forKey:@"AudioSampleRate"];
+ /* Audio Bitrate Rate*/
+ [preset setObject:@"128" forKey:@"AudioBitRate"];
+ /* Subtitles*/
+ [preset setObject:@"None" forKey:@"Subtitles"];
+
+
+ [preset autorelease];
+ return preset;
+
+}
- (IBAction)DeletePreset:(id)sender