[fDstFile2Field setStringValue: [NSString stringWithFormat:
@"%@/Desktop/%@.mp4", NSHomeDirectory(),[NSString
stringWithUTF8String: title->name]]];
+
+ int format = [fDstFormatPopUp indexOfSelectedItem];
+ char * ext = NULL;
+ switch( format )
+ {
+ case 0:
+ /* if Format is mpeg4 Change extension to proper for mpeg4 output */
+
+ /*Get Default MP4 File Extension for mpeg4 (.mp4 or .m4v) from prefs*/
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultMpegName"] > 0)
+ {
+ ext = "m4v";
+ }
+ else
+ {
+ ext = "mp4";
+ }
+ break;
+ case 1:
+ ext = "avi";
+ case 2:
+ break;
+ ext = "ogm";
+ break;
+ }
+ NSString * string = [fDstFile2Field stringValue];
+ /* Add/replace File Output name to the correct extension*/
+ if( [string characterAtIndex: [string length] - 4] == '.' )
+ {
+ [fDstFile2Field setStringValue: [NSString stringWithFormat:
+ @"%@.%s", [string substringToIndex: [string length] - 4],
+ ext]];
+ }
+ else
+ {
+ [fDstFile2Field setStringValue: [NSString stringWithFormat:
+ @"%@.%s", string, ext]];
+ }
+
[fSrcTitlePopUp addItemWithTitle: [NSString
stringWithFormat: @"%d - %02dh%02dm%02ds",
job->mux = HB_MUX_IPOD;
}
- /* Set this flag to switch from Constant Quantizer(default) to Constant Rate Factor */
- // job->crf = 1;
+ /* Set this flag to switch from Constant Quantizer(default) to Constant Rate Factor Thanks jbrjake
+ Currently only used with Constant Quality setting*/
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultCrf"] > 0 && [fVidQualityMatrix selectedRow] == 2)
+ {
+ /* Can only be used with svn rev >= 89 */
+ job->crf = 1;
+ }
job->h264_13 = [fVidEncoderPopUp indexOfSelectedItem];
}
switch( format )
{
case 0:
- ext = "mp4";
+ /*Get Default MP4 File Extension*/
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultMpegName"] > 0)
+ {
+ ext = "m4v";
+ }
+ else
+ {
+ ext = "mp4";
+ }
[fDstCodecsPopUp addItemWithTitle:
_( @"MPEG-4 Video / AAC Audio" )];
[fDstCodecsPopUp addItemWithTitle:
ACTIONS = {CheckChanged = id; ClosePanel = id; OpenPanel = id; };
CLASS = PrefsController;
LANGUAGE = ObjC;
- OUTLETS = {fPanel = NSPanel; fUpdateCheck = NSButton; fdefaultlanguage = NSComboBox; };
+ OUTLETS = {
+ fDefCrf = NSButton;
+ fFileExtItunes = NSButton;
+ fPanel = NSPanel;
+ fUpdateCheck = NSButton;
+ fdefaultlanguage = NSComboBox;
+ };
SUPERCLASS = NSObject;
},
{
</array>
<key>IBOpenObjects</key>
<array>
- <integer>1162</integer>
- <integer>21</integer>
+ <integer>1438</integer>
</array>
<key>IBSystem Version</key>
<string>8L127</string>
IBOutlet NSPanel * fPanel;
IBOutlet NSButton * fUpdateCheck;
IBOutlet NSComboBox * fdefaultlanguage;
+ IBOutlet NSButton * fFileExtItunes;
+ IBOutlet NSButton * fDefCrf;
}
- (IBAction) OpenPanel: (id) sender;
NSDictionary * appDefaults;
/* Unless the user specified otherwise, default is to check
- for update */
+ for update */
defaults = [NSUserDefaults standardUserDefaults];
appDefaults = [NSDictionary dictionaryWithObject:@"YES"
forKey:@"CheckForUpdates"];
appDefaults = [NSDictionary dictionaryWithObject:@"English"
forKey:@"DefaultLanguage"];
+ appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+ forKey:@"DefaultMpegName"];
+ appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+ forKey:@"DefaultCrf"];
[defaults registerDefaults: appDefaults];
- /* Check or uncheck according to the preferences */
+ /* fUpdateCheck Check or uncheck according to the preferences */
[fUpdateCheck setState: [defaults boolForKey:@"CheckForUpdates"] ?
NSOnState : NSOffState];
+ /* fFileExtItunes Check or uncheck according to the preferences */
+ [fFileExtItunes setState: [defaults boolForKey:@"DefaultMpegName"] ?
+ NSOnState : NSOffState];
+
+ /* fDefCrf Check or uncheck according to the preferences */
+ [fDefCrf setState: [defaults boolForKey:@"DefaultCrf"] ?
+ NSOnState : NSOffState];
+
+
// Fill the languages combobox
[fdefaultlanguage removeAllItems];
[fdefaultlanguage addItemWithObjectValue: @"Afar"];
{
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
- if( [fUpdateCheck state] == NSOnState )
+ /* Check Update Itunes Set */
+ if( [fUpdateCheck state] == NSOnState )
{
[defaults setObject:@"YES" forKey:@"CheckForUpdates"];
}
{
[defaults setObject:@"NO" forKey:@"CheckForUpdates"];
}
+ /* File Extension Itunes Set */
+
+ if( [fFileExtItunes state] == NSOnState )
+ {
+ [defaults setObject:@"YES" forKey:@"DefaultMpegName"];
+ }
+ else
+ {
+ [defaults setObject:@"NO" forKey:@"DefaultMpegName"];
+ }
+
+ /* Use CRF for constant mode */
+
+ if( [fDefCrf state] == NSOnState )
+ {
+ [defaults setObject:@"YES" forKey:@"DefaultCrf"];
+ }
+ else
+ {
+ [defaults setObject:@"NO" forKey:@"DefaultCrf"];
+ }
+ /* Preferred Language Combobox Set */
[defaults setObject:[fdefaultlanguage objectValueOfSelectedItem] forKey:@"DefaultLanguage"];
}