summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-06-14 15:04:53 +0000
committerdynaflash <[email protected]>2007-06-14 15:04:53 +0000
commit7b313a2bd42c49d61b4cac2449923c6b8dd33666 (patch)
treeaee40ee9b0af4db3cf8a8d25bca60ff939f4f04f /macosx
parent29ee70dd4a1adce5f35a26ab353c9268f7b3e476 (diff)
MacGui: Enable + 4GB Mpeg-4 file output
- Add a checkbox under "Format" field to allow > 4 gb file output. - Slightly raised the Format and Codecs popups to allow for checkbox (not totally conviced this is a good place for it, but should work for now). - checkbox auto hides if any format other than mpeg-4 is chosen. - checkbox unchecked by default. - automatically unchecks if h.264 ipod is chosen Note: It Might make sense to add some kind of global in preferences that controls whether or not that feature even presents itself at all, and default it to off so its only available if a user enables it in prefs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@619 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.h3
-rw-r--r--macosx/Controller.mm82
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib2
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib2
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin121568 -> 122200 bytes
5 files changed, 59 insertions, 30 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index d04dbab3d..8fd68ac42 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -51,7 +51,8 @@
/* Destination box */
IBOutlet NSTextField * fDstFormatField;
- IBOutlet NSPopUpButton * fDstFormatPopUp;
+ IBOutlet NSPopUpButton * fDstFormatPopUp;
+ IBOutlet NSButton * fDstMpgLargeFileCheck;
IBOutlet NSTextField * fDstCodecsField;
IBOutlet NSPopUpButton * fDstCodecsPopUp;
IBOutlet NSTextField * fDstFile1Field;
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 908b6a8f9..0addaf375 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -668,7 +668,7 @@ return registrationDictionary;
fX264optWeightBLabel,fX264optWeightBSwitch,fX264optBRDOLabel,fX264optBRDOSwitch,
fX264optBPyramidLabel,fX264optBPyramidSwitch,fX264optBiMELabel,fX264optBiMESwitch,
fX264optDirectPredLabel,fX264optDirectPredPopUp,fX264optDeblockLabel,
- fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp,fVidTurboPassCheck};
+ fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp,fVidTurboPassCheck,fDstMpgLargeFileCheck};
for( unsigned i = 0;
i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -831,17 +831,34 @@ return registrationDictionary;
job->mux = FormatSettings[format][codecs] & HB_MUX_MASK;
job->vcodec = FormatSettings[format][codecs] & HB_VCODEC_MASK;
job->acodec = FormatSettings[format][codecs] & HB_ACODEC_MASK;
- /* We set the chapter marker extraction here based on the format being
- mpeg4 and the checkbox being checked */
- if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [fCreateChapterMarkers state] == NSOnState)
+ /* If mpeg-4, then set mpeg-4 specific options like chapters and > 4gb file sizes */
+ if ([fDstFormatPopUp indexOfSelectedItem] == 0)
{
- job->chapter_markers = 1;
- }
- else
- {
- job->chapter_markers = 0;
+ /* We set the chapter marker extraction here based on the format being
+ mpeg4 and the checkbox being checked */
+ if ([fCreateChapterMarkers state] == NSOnState)
+ {
+ job->chapter_markers = 1;
+ }
+ else
+ {
+ job->chapter_markers = 0;
+ }
+ /* We set the largeFileSize (64 bit formatting) variable here to allow for > 4gb files based on the format being
+ mpeg4 and the checkbox being checked
+ *Note: this will break compatibility with some target devices like iPod, etc.!!!!*/
+ if ([fDstMpgLargeFileCheck state] == NSOnState)
+ {
+ job->largeFileSize = 1;
+ }
+ else
+ {
+ job->largeFileSize = 0;
+ }
}
- if( ( job->vcodec & HB_VCODEC_FFMPEG ) &&
+
+
+ if( ( job->vcodec & HB_VCODEC_FFMPEG ) &&
[fVidEncoderPopUp indexOfSelectedItem] > 0 )
{
job->vcodec = HB_VCODEC_XVID;
@@ -1256,7 +1273,8 @@ return registrationDictionary;
NSString * string = [fDstFile2Field stringValue];
int format = [fDstFormatPopUp indexOfSelectedItem];
char * ext = NULL;
-
+ /* Initially set the large file (64 bit formatting) output checkbox to hidden */
+ [fDstMpgLargeFileCheck setHidden: YES];
/* Update the codecs popup */
[fDstCodecsPopUp removeAllItems];
switch( format )
@@ -1277,7 +1295,9 @@ return registrationDictionary;
_( @"AVC/H.264 Video / AAC Audio" )];
/* We enable the create chapters checkbox here since we are .mp4*/
[fCreateChapterMarkers setEnabled: YES];
- break;
+ /* We show the Large File (64 bit formatting) checkbox since we are .mp4 */
+ [fDstMpgLargeFileCheck setHidden: NO];
+ break;
case 1:
ext = "avi";
[fDstCodecsPopUp addItemWithTitle:
@@ -1292,7 +1312,7 @@ return registrationDictionary;
and make sure it is unchecked*/
[fCreateChapterMarkers setEnabled: NO];
[fCreateChapterMarkers setState: NSOffState];
- break;
+ break;
case 2:
ext = "ogm";
[fDstCodecsPopUp addItemWithTitle:
@@ -1389,21 +1409,22 @@ return registrationDictionary;
/* Check to see if we need to modify the job pic values based on x264 (iPod) encoder selection */
if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [fDstCodecsPopUp indexOfSelectedItem] == 1 && [fVidEncoderPopUp indexOfSelectedItem] == 1)
{
- hb_job_t * job = fTitle->job;
- job->pixel_ratio = 0 ;
-
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPicSizeAutoiPod"] > 0)
- {
-
- if (job->width > 640)
- {
+ hb_job_t * job = fTitle->job;
+ job->pixel_ratio = 0 ;
+
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPicSizeAutoiPod"] > 0)
+ {
+
+ if (job->width > 640)
+ {
job->width = 640;
- }
- job->keep_ratio = 1;
- hb_fix_aspect( job, HB_KEEP_WIDTH );
-
- }
-
+ }
+ job->keep_ratio = 1;
+ hb_fix_aspect( job, HB_KEEP_WIDTH );
+
+ }
+ /* Make sure the 64bit formatting checkbox is off */
+ [fDstMpgLargeFileCheck setState: NSOffState];
}
[self CalculatePictureSizing: sender];
@@ -2867,6 +2888,8 @@ the user is using "Custom" settings by determining the sender*/
[preset setObject:[fDstFormatPopUp titleOfSelectedItem] forKey:@"FileFormat"];
/* Chapter Markers fCreateChapterMarkers*/
[preset setObject:[NSNumber numberWithInt:[fCreateChapterMarkers state]] forKey:@"ChapterMarkers"];
+ /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+ [preset setObject:[NSNumber numberWithInt:[fDstMpgLargeFileCheck state]] forKey:@"Mp4LargeFile"];
/* Codecs */
[preset setObject:[fDstCodecsPopUp titleOfSelectedItem] forKey:@"FileCodecs"];
/* Video encoder */
@@ -3233,9 +3256,12 @@ the user is using "Custom" settings by determining the sender*/
/* File Format */
[fDstFormatPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"FileFormat"]]];
[self FormatPopUpChanged: NULL];
+
/* Chapter Markers*/
[fCreateChapterMarkers setState:[[chosenPreset objectForKey:@"ChapterMarkers"] intValue]];
- /* Codecs */
+ /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+ [fDstMpgLargeFileCheck setState:[[chosenPreset objectForKey:@"Mp4LargeFile"] intValue]];
+ /* Codecs */
[fDstCodecsPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"FileCodecs"]]];
[self CodecsPopUpChanged: NULL];
/* Video encoder */
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 1353f489d..72d4dc396 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -73,6 +73,7 @@
fDstFile2Field = NSTextField;
fDstFormatField = NSTextField;
fDstFormatPopUp = NSPopUpButton;
+ fDstMpgLargeFileCheck = NSButton;
fPauseButton = NSButton;
fPicLabelAnamorphic = NSTextField;
fPicLabelAr = NSTextField;
@@ -177,6 +178,7 @@
fX264optViewTitleLabel = NSTextField;
fX264optWeightBLabel = NSTextField;
fX264optWeightBSwitch = NSButton;
+ myOutlet = id;
tableView = NSTableView;
};
SUPERCLASS = NSObject;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index fde292323..5734329b9 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>26 277 630 601 0 0 1440 878 </string>
+ <string>116 277 630 601 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>1843</key>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index e3aed5397..e450ce219 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ