]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Sun, 20 Mar 2011 17:49:20 +0000 (17:49 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 20 Mar 2011 17:49:20 +0000 (17:49 +0000)
- 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

win/CS/Controls/AudioPanel.cs
win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs

index cfe8fa8fbe111c8cae0fdc9464e2e8d6cb95464f..54e07af4481e2e62002d0d7b613ecb5a3a9aaa57 100644 (file)
@@ -11,6 +11,7 @@ namespace Handbrake.Controls
     using System.Linq;\r
     using System.Windows.Forms;\r
 \r
+    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Parsing;\r
@@ -115,9 +116,9 @@ namespace Handbrake.Controls
                 newTrack.CreateCells(audioList);\r
                 newTrack.Cells[0].Value = GetNewID().ToString();\r
                 newTrack.Cells[1].Value = "Automatic";\r
-                newTrack.Cells[2].Value = track.Encoder;\r
-                newTrack.Cells[3].Value = track.MixDown;\r
-                newTrack.Cells[4].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? "Auto" : track.SampleRate.ToString();\r
+                newTrack.Cells[2].Value = EnumHelper.GetDescription(track.Encoder);\r
+                newTrack.Cells[3].Value = EnumHelper.GetDescription(track.MixDown);\r
+                newTrack.Cells[4].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough || track.SampleRate == 0.0) ? "Auto" : track.SampleRate.ToString();\r
                 newTrack.Cells[5].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? "Auto" : track.Bitrate.ToString();\r
                 newTrack.Cells[6].Value = (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough) ? string.Empty : track.DRC.ToString();\r
                 AddTrackForPreset(newTrack);\r
index c6f838ed7a1a313998933959a04a49cff98e2869..23d7d9e2f5a8ab0ca262a9bcbc0adb4c7b449505 100644 (file)
@@ -18,13 +18,13 @@ namespace HandBrake.ApplicationServices.Model.Encoding
         [Description("AC3 (ffmpeg)")]\r
         Ac3,\r
 \r
-        [Description("Passthrough (AC3/DTS)")]\r
+        [Description("Passthru")]\r
         Passthrough,\r
 \r
-        [Description("Passthrough (AC3)")]\r
+        [Description("AC3 Passthru")]\r
         Ac3Passthrough,\r
 \r
-        [Description("Passthrough (DTS)")]\r
+        [Description("DTS Passthru")]\r
         DtsPassthrough,\r
 \r
         [Description("Vorbis (vorbis)")]\r
index 7e4e73baa254aa046dedc3a1a3e8d47c7579cc42..efc83429a4c968f43b7e2427d5a296677174014b 100644 (file)
@@ -375,7 +375,7 @@ namespace HandBrake.ApplicationServices.Utilities
 \r
                     if (trackSamplerates != null)\r
                         if (trackSamplerates.Length >= (x + 1)) // Audio SampleRate\r
-                            track.SampleRate = double.Parse(trackSamplerates[x].Trim());\r
+                            track.SampleRate = double.Parse(trackSamplerates[x].Replace("Auto", "0").Trim());\r
 \r
                     if (trackDRCvalues != null)\r
                         if (trackDRCvalues.Length >= (x + 1)) // Audio DRC Values\r