for( int i = 0; i < hb_list_count( list ); i++ )
{
title = (hb_title_t *) hb_list_item( list, i );
- /*Set DVD Name at top of window*/
- [fSrcDVD2Field setStringValue:[NSString stringWithUTF8String: title->name]];
-
- currentSource = [NSString stringWithUTF8String: title->dvd];
+ currentSource = [NSString stringWithUTF8String: title->dvd];
+
+ /* To get the source name as well as the default output name, first we check to see if
+ the selected directory is the VIDEO_TS Directory */
+ if ([[currentSource lastPathComponent] isEqualToString: @"VIDEO_TS"])
+ {
+ /* If VIDEO_TS Folder is chosen, choose its parent folder for the source display name */
+ sourceDisplayName = [NSString stringWithFormat:[[currentSource stringByDeletingLastPathComponent] lastPathComponent]];
+ }
+ else
+ {
+ /* if not the VIDEO_TS Folder, we can assume the chosen folder is the source name */
+ sourceDisplayName = [NSString stringWithFormat:[currentSource lastPathComponent]];
+ }
+ /*Set DVD Name at top of window*/
+ [fSrcDVD2Field setStringValue:[NSString stringWithFormat: @"%@", sourceDisplayName]];
/* Use the dvd name in the default output field here
May want to add code to remove blank spaces for some dvd names*/
if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"])
{
[fDstFile2Field setStringValue: [NSString stringWithFormat:
- @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],[NSString
- stringWithUTF8String: title->name]]];
+ @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],sourceDisplayName]];
}
else
{
[fDstFile2Field setStringValue: [NSString stringWithFormat:
- @"%@/Desktop/%@.mp4", NSHomeDirectory(),[NSString
- stringWithUTF8String: title->name]]];
+ @"%@/Desktop/%@.mp4", NSHomeDirectory(),sourceDisplayName]];
}
SuccessfulScan = 1;
[self enableUI: YES];
- /* we record the current source name here in case the next scan is unsuccessful,
- then we can replace the scan progress with the old name if necessary */
- sourceDisplayName = [NSString stringWithFormat:[fSrcDVD2Field stringValue]];
-
- /* if its the initial successful scan after awakeFromNib */
+ /* if its the initial successful scan after awakeFromNib */
if (currentSuccessfulScanCount == 1)
{
[self selectDefaultPreset: NULL];
- (IBAction) formatPopUpChanged: (id) sender
{
NSString * string = [fDstFile2Field stringValue];
+ NSString * selectedCodecs = [fDstCodecsPopUp titleOfSelectedItem];
int format = [fDstFormatPopUp indexOfSelectedItem];
char * ext = NULL;
/* Initially set the large file (64 bit formatting) output checkbox to hidden */
[fCreateChapterMarkers setEnabled: YES];
break;
}
+ if ( SuccessfulScan ) {
+ [fDstCodecsPopUp selectItemWithTitle:selectedCodecs];
+ if ( [fDstCodecsPopUp selectedItem] == NULL )
+ [fDstCodecsPopUp selectItemAtIndex:0];
+ }
[self codecsPopUpChanged: NULL];
/* Add/replace to the correct extension */
int audioCodecsSupportMono = ((audio->codec == HB_ACODEC_AC3 ||
audio->codec == HB_ACODEC_DCA) && acodec == HB_ACODEC_FAAC);
int audioCodecsSupport6Ch = ((audio->codec == HB_ACODEC_AC3 ||
- audio->codec == HB_ACODEC_DCA) && acodec == HB_ACODEC_FAAC);
+ audio->codec == HB_ACODEC_DCA) && (acodec == HB_ACODEC_FAAC ||
+ acodec == HB_ACODEC_VORBIS));
/* check for AC-3 passthru */
if (audio->codec == HB_ACODEC_AC3 && acodec == HB_ACODEC_AC3)
break;
case HB_ACODEC_VORBIS:
+ if ([[fAudTrack1MixPopUp selectedItem] tag] == HB_AMIXDOWN_6CH || [[fAudTrack2MixPopUp selectedItem] tag] == HB_AMIXDOWN_6CH)
+ {
+ /* Vorbis causes a crash if we use a bitrate below 192 kbps with 6 channel */
+ minbitrate = 192;
+ /* If either mixdown popup includes 6-channel discrete, then allow up to 384 kbps */
+ maxbitrate = 384;
+ break;
+ }
+ else
+ {
/* Vorbis causes a crash if we use a bitrate below 48 kbps */
minbitrate = 48;
/* Vorbis can cope with 384 kbps quite happily, even for stereo */
maxbitrate = 384;
break;
+ }
default:
/* AC3 passthru disables the bitrate dropdown anyway, so we might as well just use the min and max bitrate */