summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjbrjake <jb.rubin@gmail.com>2010-06-19 16:40:01 +0000
committerjbrjake <jb.rubin@gmail.com>2010-06-19 16:40:01 +0000
commit1f496b9534ee4a2f0e1257fe26daaabde8b0230c (patch)
tree718ca91b1953efa88524a28f7e5c7b88da827609 /macosx
parentcc4a637adaa6677fecab50025463fefcc30c6a25 (diff)
MacGui: Adds a built-in iPad preset with a max width of 1024, peak fps of 29.97, and, at least for now, default x264 options.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3393 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBPresets.h1
-rw-r--r--macosx/HBPresets.m100
2 files changed, 101 insertions, 0 deletions
diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h
index d8ea61a2e..b4e150710 100644
--- a/macosx/HBPresets.h
+++ b/macosx/HBPresets.h
@@ -17,6 +17,7 @@
- (NSDictionary *)createRegularPresetFolder;
- (NSDictionary *)createLegacyPresetFolder;
+- (NSDictionary *)createiPadPreset;
- (NSDictionary *)createAppleTVPreset;
- (NSDictionary *)createAppleTVLegacyPreset;
- (NSDictionary *)createAppleUniversalPreset;
diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m
index 995325e00..58e950b58 100644
--- a/macosx/HBPresets.m
+++ b/macosx/HBPresets.m
@@ -61,6 +61,7 @@
[childrenArray addObject:[self createAppleUniversalPreset]];
[childrenArray addObject:[self createIpodLowPreset]];
[childrenArray addObject:[self createiPhonePreset]];
+ [childrenArray addObject:[self createiPadPreset]];
[childrenArray addObject:[self createAppleTVPreset]];
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
@@ -484,6 +485,105 @@
return preset;
}
+- (NSDictionary *)createiPadPreset
+{
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+ /* Get the New Preset Name from the field in the AddPresetPanel */
+ [preset setObject:@"iPad" 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 a folder, 1 is bool for folder*/
+ [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
+ /*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"];
+
+ /* Get the New Preset Description from the field in the AddPresetPanel */
+ [preset setObject:@"HandBrake's preset for the iPad (1st gen) is optimized for viewing on its 1024x768 display." forKey:@"PresetDescription"];
+
+ /* File Format */
+ [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+ /* 64-bit MP4 file */
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
+
+ /* Chapter Markers*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+ /* Video encoder */
+ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+ /* x264 Option String (We can use this to tweak the output)*/
+ [preset setObject:@"" forKey:@"x264Option"];
+
+ /* Video quality */
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+ [preset setObject:@"700" forKey:@"VideoTargetSize"];
+ [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
+ [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
+
+ /* Video framerate */
+ [preset setObject:@"29.97 (NTSC Video)" forKey:@"VideoFramerate"];
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoFrameratePFR"];
+
+ /* GrayScale */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+ /* 2 Pass Encoding */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+ /* Basic Picture Settings */
+ /* Use Max Picture settings for whatever the dvd is.*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+ [preset setObject:[NSNumber numberWithInt:1024] forKey:@"PictureWidth"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
+
+ /* Explicitly set the filters for built-in presets */
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+ /* Set crop settings here */
+ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+ /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+ * not listed will be set to "None" and not encoded */
+ NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
+
+ /* Track 1 */
+ NSMutableDictionary *audioTrack1Array = [[NSMutableDictionary alloc] init];
+ [audioTrack1Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
+ [audioTrack1Array setObject:@"AAC (faac)" forKey:@"AudioEncoder"];
+ [audioTrack1Array setObject:@"Dolby Pro Logic II" forKey:@"AudioMixdown"];
+ [audioTrack1Array setObject:@"48" forKey:@"AudioSamplerate"];
+ [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"];
+ [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
+ [audioTrack1Array autorelease];
+ [audioListArray addObject:audioTrack1Array];
+
+ [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
+
+ /* Subtitles*/
+ [preset setObject:@"None" forKey:@"Subtitles"];
+
+ [preset autorelease];
+ return preset;
+}
+
- (NSDictionary *)createClassicPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];