summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/QueryParser.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-01-30 23:52:47 +0000
committersr55 <[email protected]>2010-01-30 23:52:47 +0000
commit377768a2a90f5b470a1c047a02f4c998a8b348b4 (patch)
tree90ce0b844e17f6525a75805811555bde12cb6bcd /win/C#/Functions/QueryParser.cs
parent971ab73d6af6d07838922a667648c97e2f07c041 (diff)
WinGui:
- Added some code to allow direct execution of the CLI rather than using CMD. This may be useful later on. - Re-factoring. Added Many code comments / Cleaned up some code style issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3088 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/QueryParser.cs')
-rw-r--r--win/C#/Functions/QueryParser.cs40
1 files changed, 17 insertions, 23 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 60afe7bca..413f8fa4c 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -9,10 +9,11 @@ using System.Globalization;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Collections;
+using Handbrake.Model;
namespace Handbrake.Functions
{
- internal class QueryParser
+ public class QueryParser
{
private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
@@ -365,7 +366,7 @@ namespace Handbrake.Functions
trackDRCvalues = drcValues.ToString().Replace("-D ", "").Split(',');
// Create new Audio Track Classes and store them in the ArrayList
- ArrayList AllAudioTrackInfo = new ArrayList();
+ ArrayList allAudioTrackInfo = new ArrayList();
for (int x = 0; x < encoderCount; x++)
{
AudioTrack track = new AudioTrack();
@@ -393,9 +394,9 @@ namespace Handbrake.Functions
if (trackDRCvalues.Length >= (x + 1)) // Audio DRC Values
track.DRC = trackDRCvalues[x].Trim();
- AllAudioTrackInfo.Add(track);
+ allAudioTrackInfo.Add(track);
}
- thisQuery.AudioInformation = AllAudioTrackInfo;
+ thisQuery.AudioInformation = allAudioTrackInfo;
// Subtitle Stuff
if (subtitles.Success)
@@ -431,6 +432,12 @@ namespace Handbrake.Functions
return thisQuery;
}
+
+ /// <summary>
+ /// Get the GUI equiv to a CLI mixdown
+ /// </summary>
+ /// <param name="mixdown"></param>
+ /// <returns></returns>
private static string GetMixDown(string mixdown)
{
switch (mixdown.Trim())
@@ -449,6 +456,12 @@ namespace Handbrake.Functions
return "Automatic";
}
}
+
+ /// <summary>
+ /// Get the GUI equiv to a CLI audio encoder
+ /// </summary>
+ /// <param name="audioEnc"></param>
+ /// <returns></returns>
private static string GetAudioEncoder(string audioEnc)
{
switch (audioEnc)
@@ -468,23 +481,4 @@ namespace Handbrake.Functions
}
}
}
-
- public class AudioTrack
- {
- public AudioTrack()
- {
- // Default Values
- Track = "Automatic";
- MixDown = "Automatic";
- SampleRate = "Auto";
- Bitrate = "Auto";
- DRC = "1";
- }
- public string Track { get; set; }
- public string MixDown { get; set; }
- public string Encoder { get; set; }
- public string Bitrate { get; set; }
- public string SampleRate { get; set; }
- public string DRC { get; set; }
- }
} \ No newline at end of file