diff options
author | sr55 <[email protected]> | 2012-07-23 16:57:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-07-23 16:57:39 +0000 |
commit | 6c8108e0760796e153f62de9b08325f433105bff (patch) | |
tree | f584e99a9ace46b1bce9af6f9136f67375cb1226 /win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | |
parent | daafb500d527e3e5d1a1790bba6dd287c28eedbb (diff) |
WinGui: Fix up the Audio Passthru selection options.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4872 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 4b5071984..bacb25de3 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -646,38 +646,50 @@ namespace HandBrake.ApplicationServices.Utilities query += " --gain " + audioItems;
// Passthru Settings
- if (task.AllowedPassthruOptions != null && task.AllowedPassthruOptions.IsEnabled)
+ if (task.AllowedPassthruOptions != null)
{
string fallbackEncoders = string.Empty;
- if (task.AllowedPassthruOptions.AudioAllowAACPass)
+ if (task.AllowedPassthruOptions.AudioAllowAACPass != null && task.AllowedPassthruOptions.AudioAllowAACPass.Value)
{
fallbackEncoders += "aac";
}
- if (task.AllowedPassthruOptions.AudioAllowAC3Pass)
+ if (task.AllowedPassthruOptions.AudioAllowAC3Pass != null && task.AllowedPassthruOptions.AudioAllowAC3Pass.Value)
{
fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "ac3" : ",ac3";
}
- if (task.AllowedPassthruOptions.AudioAllowDTSHDPass)
+ if (task.AllowedPassthruOptions.AudioAllowDTSHDPass != null && task.AllowedPassthruOptions.AudioAllowDTSHDPass.Value)
{
fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "dtshd" : ",dtshd";
}
- if (task.AllowedPassthruOptions.AudioAllowDTSPass)
+ if (task.AllowedPassthruOptions.AudioAllowDTSPass != null && task.AllowedPassthruOptions.AudioAllowDTSPass.Value)
{
fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "dts" : ",dts";
}
- if (task.AllowedPassthruOptions.AudioAllowMP3Pass)
+ if (task.AllowedPassthruOptions.AudioAllowMP3Pass != null && task.AllowedPassthruOptions.AudioAllowMP3Pass.Value)
{
fallbackEncoders += string.IsNullOrEmpty(fallbackEncoders) ? "mp3" : ",mp3";
}
if (!string.IsNullOrEmpty(fallbackEncoders))
{
- query += string.Format(" --audio-copy-mask {0}", fallbackEncoders);
+ // Special Case, The CLI alredy defaults to ALL, so if all area selected, then just set copy-mask to none
+ if (fallbackEncoders == "aac,ac3,dtshd,dts,mp3")
+ {
+ query += string.Format(" --audio-copy-mask none");
+ }
+ else
+ {
+ query += string.Format(" --audio-copy-mask {0}", fallbackEncoders);
+ }
+ }
+ else
+ {
+ query += string.Format(" --audio-copy-mask none");
}
query += string.Format(" --audio-fallback {0}", Converters.GetCliAudioEncoder(task.AllowedPassthruOptions.AudioEncoderFallback));
|