diff options
author | sr55 <[email protected]> | 2011-03-20 17:49:20 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-03-20 17:49:20 +0000 |
commit | fdef4b5164b56403a2a6710ffb5a605d0e434924 (patch) | |
tree | 598261e64d7b742ecdc40c801cbf6a8295a1648e | |
parent | fc436bc475affd57046a4408a60730ec6f3d2fa6 (diff) |
WinGui:
- Bugfixes in the audio panel to handle the enumerations correctly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3856 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 7 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index cfe8fa8fb..54e07af44 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -11,6 +11,7 @@ namespace Handbrake.Controls using System.Linq;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
@@ -115,9 +116,9 @@ namespace Handbrake.Controls newTrack.CreateCells(audioList);
newTrack.Cells[0].Value = GetNewID().ToString();
newTrack.Cells[1].Value = "Automatic";
- newTrack.Cells[2].Value = track.Encoder;
- newTrack.Cells[3].Value = track.MixDown;
- newTrack.Cells[4].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? "Auto" : track.SampleRate.ToString();
+ newTrack.Cells[2].Value = EnumHelper.GetDescription(track.Encoder);
+ newTrack.Cells[3].Value = EnumHelper.GetDescription(track.MixDown);
+ newTrack.Cells[4].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough || track.SampleRate == 0.0) ? "Auto" : track.SampleRate.ToString();
newTrack.Cells[5].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? "Auto" : track.Bitrate.ToString();
newTrack.Cells[6].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? string.Empty : track.DRC.ToString();
AddTrackForPreset(newTrack);
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs index c6f838ed7..23d7d9e2f 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs @@ -18,13 +18,13 @@ namespace HandBrake.ApplicationServices.Model.Encoding [Description("AC3 (ffmpeg)")]
Ac3,
- [Description("Passthrough (AC3/DTS)")]
+ [Description("Passthru")]
Passthrough,
- [Description("Passthrough (AC3)")]
+ [Description("AC3 Passthru")]
Ac3Passthrough,
- [Description("Passthrough (DTS)")]
+ [Description("DTS Passthru")]
DtsPassthrough,
[Description("Vorbis (vorbis)")]
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index 7e4e73baa..efc83429a 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -375,7 +375,7 @@ namespace HandBrake.ApplicationServices.Utilities if (trackSamplerates != null)
if (trackSamplerates.Length >= (x + 1)) // Audio SampleRate
- track.SampleRate = double.Parse(trackSamplerates[x].Trim());
+ track.SampleRate = double.Parse(trackSamplerates[x].Replace("Auto", "0").Trim());
if (trackDRCvalues != null)
if (trackDRCvalues.Length >= (x + 1)) // Audio DRC Values
|