summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-06-18 19:19:35 +0000
committersr55 <[email protected]>2010-06-18 19:19:35 +0000
commitd514009752e382a26387f14314f1f643bbac333e (patch)
tree5ccd7ef62391b6c09578a4597fd4d883be891f0b /win/C#/Functions
parent52cc84bfac801b89127403139a3cd67d786700c5 (diff)
WinGui:
- Updates to the x264 panel. - Added a Peak Framerate checkbox (--pfr cli option) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3388 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/PresetLoader.cs1
-rw-r--r--win/C#/Functions/QueryGenerator.cs3
-rw-r--r--win/C#/Functions/QueryParser.cs8
3 files changed, 12 insertions, 0 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index f10bd0073..9b6d154ad 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -183,6 +183,7 @@ namespace Handbrake.Functions
mainWindow.check_2PassEncode.CheckState = presetQuery.TwoPass ? CheckState.Checked : CheckState.Unchecked;
mainWindow.drp_videoFramerate.Text = presetQuery.VideoFramerate;
+ mainWindow.checkMaximumFramerate.Checked = presetQuery.Pfr;
mainWindow.check_turbo.CheckState = presetQuery.TurboFirstPass ? CheckState.Checked : CheckState.Unchecked;
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index e4557df6f..203e4e659 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -248,6 +248,9 @@ namespace Handbrake.Functions
if (mainWindow.drp_videoFramerate.Text != "Same as source")
query += " -r " + mainWindow.drp_videoFramerate.Text;
+ if (mainWindow.checkMaximumFramerate.Checked)
+ query += " --pfr ";
+
#endregion
#region Audio Settings Tab
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 8523fc178..f0c7fdb61 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -197,6 +197,11 @@ namespace Handbrake.Functions
public string VideoFramerate { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether Pfr.
+ /// </summary>
+ public bool Pfr { get; set; }
+
+ /// <summary>
/// Gets or sets AverageVideoBitrate.
/// </summary>
public string AverageVideoBitrate { get; set; }
@@ -343,6 +348,7 @@ namespace Handbrake.Functions
Match twoPass = Regex.Match(input, @" -2");
Match turboFirstPass = Regex.Match(input, @" -T");
Match optimizeMP4 = Regex.Match(input, @" -O");
+ Match pfr = Regex.Match(input, @" --pfr");
// Audio Settings Tab
Match noAudio = Regex.Match(input, @"-a none");
@@ -522,6 +528,8 @@ namespace Handbrake.Functions
thisQuery.VideoFramerate = videoFramerate.Success
? videoFramerate.ToString().Replace("-r ", string.Empty)
: "Same as source";
+
+ thisQuery.Pfr = pfr.Success;
thisQuery.Grayscale = grayscale.Success;
thisQuery.TwoPass = twoPass.Success;
thisQuery.TurboFirstPass = turboFirstPass.Success;