From 5d430dbcbc2458f0268616c54d7cf0be71ed5611 Mon Sep 17 00:00:00 2001 From: Timo Erdmann Date: Tue, 18 Aug 2015 20:49:06 +0200 Subject: [PATCH] DTS Passthrough added in Settings for Batch- Mode --- Classes/SBPrefsController.m | 1 + Classes/SBQueueItem.m | 19 ++++- English.lproj/Prefs.xib | 138 +++++++++++++++++-------------- Subler.xcodeproj/project.pbxproj | 2 +- 4 files changed, 94 insertions(+), 66 deletions(-) diff --git a/Classes/SBPrefsController.m b/Classes/SBPrefsController.m index e3d30b1..eeab860 100755 --- a/Classes/SBPrefsController.m +++ b/Classes/SBPrefsController.m @@ -39,6 +39,7 @@ @"SBAudioMixdown": @"1", @"SBAudioBitrate": @"96", @"SBAudioConvertAC3": @"YES", + @"SBAudioDtsPassthrough": @"NO", @"SBAudioKeepAC3": @"YES", @"SBSubtitleConvertBitmap": @"YES", @"SBRatingsCountry": @"All countries", diff --git a/Classes/SBQueueItem.m b/Classes/SBQueueItem.m index 57625b9..104353b 100755 --- a/Classes/SBQueueItem.m +++ b/Classes/SBQueueItem.m @@ -206,9 +206,24 @@ } // DTS -> always convert. + if ([track.format isEqualToString:MP42AudioFormatDTS]) { + if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"SBAudioDtsPassthrough"] boolValue]) { + MP42AudioTrack *copy = [track copy]; + copy.needConversion = YES; + copy.mixdownType = SBDolbyPlIIMixdown; + + [self.mp4File addTrack:copy]; + + [copy release]; + } + else { + track.needConversion = YES; + } + } + + // VobSub -> only if specified in the prefs. - if ([track.format isEqualToString:MP42AudioFormatDTS] || - ([track.format isEqualToString:MP42SubtitleFormatVobSub] && [[[NSUserDefaults standardUserDefaults] valueForKey:@"SBSubtitleConvertBitmap"] boolValue])) + if (([track.format isEqualToString:MP42SubtitleFormatVobSub] && [[[NSUserDefaults standardUserDefaults] valueForKey:@"SBSubtitleConvertBitmap"] boolValue])) track.needConversion = YES; // If an audio track needs to be converted, apply the mixdown from the preferences. diff --git a/English.lproj/Prefs.xib b/English.lproj/Prefs.xib index dfabcf3..b1e5b82 100755 --- a/English.lproj/Prefs.xib +++ b/English.lproj/Prefs.xib @@ -1,8 +1,8 @@ - + - - + + @@ -16,7 +16,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -181,11 +181,11 @@ - + - + @@ -193,35 +193,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -275,11 +306,11 @@ - + - + @@ -296,27 +327,8 @@ - - - - - - - - - - + @@ -331,7 +343,7 @@ - + @@ -412,7 +424,7 @@ - + diff --git a/Subler.xcodeproj/project.pbxproj b/Subler.xcodeproj/project.pbxproj index d2d7f28..ecdb0be 100755 --- a/Subler.xcodeproj/project.pbxproj +++ b/Subler.xcodeproj/project.pbxproj @@ -121,7 +121,7 @@ A941B4DF134A531400E22F45 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; - dstPath = tessdata; + dstPath = ""; dstSubfolderSpec = 7; files = ( );