diff options
author | sr55 <[email protected]> | 2012-01-14 19:10:17 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-01-14 19:10:17 +0000 |
commit | 1c231b4e398f973487822f0aa607f9c8e5ff82fa (patch) | |
tree | 581a3536561a19d0143145917a9463ccc549d334 /win/CS/Functions | |
parent | 01c8ab3532c0c30748fd3e7a0376e3f32928c72f (diff) |
WinGui: Add support for --audio-copy-mask and --audio-fallback
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4408 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Functions')
-rw-r--r-- | win/CS/Functions/QueryGenerator.cs | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/win/CS/Functions/QueryGenerator.cs b/win/CS/Functions/QueryGenerator.cs index 8ffdb888e..de4257a32 100644 --- a/win/CS/Functions/QueryGenerator.cs +++ b/win/CS/Functions/QueryGenerator.cs @@ -507,6 +507,7 @@ namespace Handbrake.Functions // Audio Gain Control
gainValues += string.IsNullOrEmpty(gainValues) ? audioTrack.Gain.ToString(Culture) : string.Format(",{0}", audioTrack.Gain.ToString(Culture));
+
trackNames += string.IsNullOrEmpty(trackNames)
? string.IsNullOrEmpty(audioTrack.TrackName) ? "\"\"" : string.Format("\"{0}\"", audioTrack.TrackName.Trim())
: string.IsNullOrEmpty(audioTrack.TrackName) ? ",\"\"" : string.Format(",\"{0}\"", audioTrack.TrackName.Trim());
@@ -527,6 +528,44 @@ namespace Handbrake.Functions audioQuery += string.Format(" --aname={0}", trackNames);
}
+ // Passthru Settings
+ if (mainWindow.AudioSettings.PassthruSettings != null)
+ {
+ string fallbackEncoders = string.Empty;
+
+ if (mainWindow.AudioSettings.PassthruSettings.AudioAllowAACPass)
+ {
+ fallbackEncoders += "aac";
+ }
+
+ if (mainWindow.AudioSettings.PassthruSettings.AudioAllowAC3Pass)
+ {
+ fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "ac3" : ",ac3";
+ }
+
+ if (mainWindow.AudioSettings.PassthruSettings.AudioAllowDTSHDPass)
+ {
+ fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "dtshd" : ",dtshd";
+ }
+
+ if (mainWindow.AudioSettings.PassthruSettings.AudioAllowDTSPass)
+ {
+ fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "dts" : ",dts";
+ }
+
+ if (mainWindow.AudioSettings.PassthruSettings.AudioAllowMP3Pass)
+ {
+ fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "mp3" : ",mp3";
+ }
+
+ if (!string.IsNullOrEmpty(fallbackEncoders))
+ {
+ audioQuery += string.Format(" --audio-copy-mask {0}", fallbackEncoders);
+ }
+
+ audioQuery += string.Format(" --audio-fallback {0}", Converters.GetCliAudioEncoder(mainWindow.AudioSettings.PassthruSettings.AudioEncoderFallback));
+ }
+
return audioQuery;
}
@@ -614,7 +653,7 @@ namespace Handbrake.Functions private static EncodeTask CreateEncodeTaskObject(frmMain frmMain)
{
EncodeTask task = new EncodeTask();
-
+
// Source, Destination and Output Settings
task.Destination = frmMain.text_destination.Text;
string sourcePath = frmMain.selectedTitle != null && File.Exists(frmMain.selectedTitle.SourceName)
@@ -655,7 +694,7 @@ namespace Handbrake.Functions break;
default:
break;
- }
+ }
task.OutputFormat = EnumHelper<OutputFormat>.GetValue(frmMain.drop_format.Text.Replace(" File", string.Empty).Trim());
task.LargeFile = frmMain.check_largeFile.Checked;
@@ -682,7 +721,7 @@ namespace Handbrake.Functions int.TryParse(frmMain.PictureSettings.updownParHeight.Text, out parY);
switch (frmMain.PictureSettings.drp_anamorphic.SelectedIndex)
{
- case 0:
+ case 0:
task.Anamorphic = Anamorphic.None;
task.Modulus = modulus;
break;
|