summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-12-09 22:16:16 +0000
committersr55 <[email protected]>2007-12-09 22:16:16 +0000
commitc9fd6a363cd209ea453b650283ef5dc915ab4eba (patch)
tree52b1c114a5cb642fe8f077e480b75777f142abda /win/C#/Functions
parentdae9c0665db8cfcc0d25ee4f6e280a6ee894faf7 (diff)
WinGui:
- Removed extra folder.png file from the Resources - Added support for Dynamic Range compression on a scale of 1 to 4. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1113 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/QueryParser.cs90
1 files changed, 64 insertions, 26 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 110294803..c39a6a4e6 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -12,6 +12,7 @@ namespace Handbrake.Functions
// All the Main Window GUI options
#region Varibles
+ #region Source
private string q_source;
/// <summary>
/// Returns a String
@@ -24,69 +25,71 @@ namespace Handbrake.Functions
return this.q_source;
}
}
-
- private string q_destination;
+ private int q_dvdTitle;
/// <summary>
- /// Returns a String
- /// Full path of the destination.
+ /// Returns an Integer
+ /// DVD Title number.
/// </summary>
- public string Destination
+ public int DVDTitle
{
get
{
- return this.q_destination;
+ return this.q_dvdTitle;
}
}
- private string q_format;
+ private int q_chaptersStart;
/// <summary>
- /// Returns a String
- /// Full path of the destination.
+ /// Returns an Int
+ /// DVD Chapter number or chapter range.
/// </summary>
- public string Format
+ public int DVDChapterStart
{
get
{
- return this.q_format;
+ return this.q_chaptersStart;
}
}
- private int q_dvdTitle;
+ private int q_chaptersFinish;
/// <summary>
- /// Returns an Integer
- /// DVD Title number.
+ /// Returns an Int
+ /// DVD Chapter number or chapter range.
/// </summary>
- public int DVDTitle
+ public int DVDChapterFinish
{
get
{
- return this.q_dvdTitle;
+ return this.q_chaptersFinish;
}
}
+#endregion
- private int q_chaptersStart;
+ #region Destination
+
+ private string q_destination;
/// <summary>
- /// Returns an Int
- /// DVD Chapter number or chapter range.
+ /// Returns a String
+ /// Full path of the destination.
/// </summary>
- public int DVDChapterStart
+ public string Destination
{
get
{
- return this.q_chaptersStart;
+ return this.q_destination;
}
}
- private int q_chaptersFinish;
+ private string q_format;
/// <summary>
- /// Returns an Int
- /// DVD Chapter number or chapter range.
+ /// Returns a String
+ /// Full path of the destination.
/// </summary>
- public int DVDChapterFinish
+ public string Format
{
get
{
- return this.q_chaptersFinish;
+ return this.q_format;
}
}
@@ -115,7 +118,9 @@ namespace Handbrake.Functions
return this.q_audioEncoder;
}
}
+#endregion
+ #region Picture Settings
private int q_videoWidth;
/// <summary>
/// Returns an Int
@@ -302,7 +307,9 @@ namespace Handbrake.Functions
return this.q_chapterMarkers;
}
}
+ #endregion
+ #region Video Settings
private Boolean q_grayscale;
/// <summary>
/// Returns a boolean to indicate wither Grayscale is on or off.
@@ -434,7 +441,9 @@ namespace Handbrake.Functions
return this.q_crf;
}
}
+ #endregion
+ #region Audio Settings
private string q_audioBitrate;
/// <summary>
/// Returns a string with the audio bitrate
@@ -495,6 +504,19 @@ namespace Handbrake.Functions
}
}
+ private double q_drc;
+ /// <summary>
+ /// Returns a string with the selected subtitle track
+ /// </summary>
+ public double DRC
+ {
+ get
+ {
+ return this.q_drc;
+ }
+ }
+
+
private string q_subtitles;
/// <summary>
/// Returns a string with the selected subtitle track
@@ -519,6 +541,9 @@ namespace Handbrake.Functions
}
}
+ #endregion
+
+ #region Other
private string q_h264;
/// <summary>
/// Returns a string with the Advanced H264 query string
@@ -543,6 +568,8 @@ namespace Handbrake.Functions
}
#endregion
+ #endregion
+
// Takes in a query which can be in any order and parses it. All varibles are then set so they can be used elsewhere.
public static QueryParser Parse(String input)
{
@@ -597,6 +624,7 @@ namespace Handbrake.Functions
Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");
Match audioTrack2 = Regex.Match(input, @"-a ([0-9]*),([0-9]*)");
Match forcedSubtitles = Regex.Match(input, @"-F");
+ Match drc = Regex.Match(input, @"-D ([0-9.]*)");
//H264 Tab
Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");
@@ -857,6 +885,16 @@ namespace Handbrake.Functions
thisQuery.q_subtitles = "None";
}
+ if (drc.Success != false)
+ {
+ string value = drc.ToString().Replace("-D ", "");
+ thisQuery.q_drc = double.Parse(value);
+ }
+ else
+ {
+ thisQuery.q_drc = 0;
+ }
+
thisQuery.q_forcedSubs = forcedSubtitles.Success;
#endregion