summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-02-23 15:43:16 +0000
committersr55 <[email protected]>2014-02-23 15:43:16 +0000
commit71c53a04fc0d43fee4ee024f854ebc6783234fd2 (patch)
tree38f3ed0d47fb7dc388999dfdb554334827d45337 /win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
parentb29ad15acd51f7fc869f7bac9d77d7540e143740 (diff)
WinGui: x265 UI patch by Zhang Zhigiang.
This enables support for the x265 encoder from the GUI when paired with a build of HandBrake that has x265 enabled. Thanks git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6062 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs36
1 files changed, 35 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
index 4872d6e7d..a3cfae6fe 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -115,6 +115,9 @@ namespace HandBrake.ApplicationServices.Utilities
Match x264Profile = Regex.Match(input, @"--x264-profile([=a-zA-Z0-9\s ]*)");
Match h264Level = Regex.Match(input, @"--h264-level([=a-zA-Z0-9.\s ]*)");
+ Match x265Profile = Regex.Match(input, @"--x265-profile([=a-zA-Z0-9\s ]*)");
+ Match x265Tune = Regex.Match(input, @"--x265-tune([=,a-zA-Z0-9\s ]*)");
+ Match x265Preset = Regex.Match(input, @"--x265-preset([=a-zA-Z0-9\s ]*)");
#endregion
#region Set Varibles
@@ -476,7 +479,38 @@ namespace HandBrake.ApplicationServices.Utilities
parsed.X264Tune = Converters.Getx264TuneFromCli(tuneOptions);
}
-
+
+
+
+
+
+
+ if (x265Preset.Success)
+ parsed.X265Preset =
+ Converters.Getx265PresetFromCli(x265Preset.ToString().Replace("--x265-preset", string.Empty).Replace("=", string.Empty).Trim());
+
+ if (h264Profile.Success)
+ parsed.H265Profile =
+ Converters.Getx265ProfileFromCli(h264Profile.ToString().Replace("--h265-profile", string.Empty).Replace("=", string.Empty).Trim());
+
+ if (x265Profile.Success)
+ parsed.H265Profile =
+ Converters.Getx265ProfileFromCli(x265Profile.ToString().Replace("--x265-profile", string.Empty).Replace("=", string.Empty).Trim());
+
+ if (x265Tune.Success)
+ {
+ string tuneOptions =
+ x265Tune.ToString().Replace("--x265-tune", string.Empty).Replace("=", string.Empty).Trim();
+
+ parsed.FastDecode = tuneOptions.Contains("fastdecode");
+
+ // Remove these options. They are not in the dropdown.
+ tuneOptions = tuneOptions.Replace("fastdecode", string.Empty).Replace(
+ ",", string.Empty);
+
+ parsed.X265Tune = Converters.Getx265TuneFromCli(tuneOptions);
+ }
+
#endregion
}
catch (Exception exc)