summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs68
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs7
2 files changed, 44 insertions, 31 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
index 1447c1b7e..e5849bd1c 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
@@ -902,48 +902,56 @@ namespace HandBrake.ApplicationServices.Utilities
if (task.VideoEncoder == VideoEncoder.X264)
{
string query = string.Empty;
-
- if (task.X264Preset != x264Preset.Medium)
- {
- query += string.Format(" --x264-preset={0} ", task.X264Preset.ToString().ToLower().Replace(" ", string.Empty));
- }
-
- if (task.H264Profile != x264Profile.None)
- {
- query += string.Format(" --x264-profile={0} ", task.H264Profile.ToString().ToLower().Replace(" ", string.Empty));
- }
-
- if (task.X264Tune != x264Tune.None)
+
+ if (!task.ShowAdvancedTab)
{
- string tune = string.Empty;
+ if (task.X264Preset != x264Preset.Medium)
+ {
+ query += string.Format(
+ " --x264-preset={0} ", task.X264Preset.ToString().ToLower().Replace(" ", string.Empty));
+ }
- if (task.FastDecode)
+ if (task.H264Profile != x264Profile.None)
{
- tune = "fastdecode";
+ query += string.Format(
+ " --x264-profile={0} ", task.H264Profile.ToString().ToLower().Replace(" ", string.Empty));
}
- string tuneDropdown = task.X264Tune.ToString().ToLower().Replace(" ", string.Empty);
- if (task.X264Tune != x264Tune.None && !string.IsNullOrEmpty(tuneDropdown))
+ if (task.X264Tune != x264Tune.None)
{
- tune = string.IsNullOrEmpty(tune) ? tuneDropdown : string.Format(",{0}", tuneDropdown);
+ string tune = string.Empty;
+
+ if (task.FastDecode)
+ {
+ tune = "fastdecode";
+ }
+
+ string tuneDropdown = task.X264Tune.ToString().ToLower().Replace(" ", string.Empty);
+ if (task.X264Tune != x264Tune.None && !string.IsNullOrEmpty(tuneDropdown))
+ {
+ tune = string.IsNullOrEmpty(tune) ? tuneDropdown : string.Format(",{0}", tuneDropdown);
+ }
+
+ query += string.Format(" --x264-tune=\"{0}\" ", tune);
}
- query += string.Format(" --x264-tune=\"{0}\" ", tune);
- }
+ if (task.H264Level != "Auto")
+ {
+ query += string.Format(" --h264-level=\"{0}\" ", task.H264Level);
+ }
- if (task.H264Level != "Auto")
- {
- query += string.Format(" --h264-level=\"{0}\" ", task.H264Level);
- }
+ if (!string.IsNullOrEmpty(task.ExtraAdvancedArguments))
+ {
+ query += string.Format(" -x {0}", task.ExtraAdvancedArguments);
+ }
- if (!string.IsNullOrEmpty(task.AdvancedEncoderOptions))
- {
- query += string.Format(" -x {0}", task.AdvancedEncoderOptions);
}
-
- if (!string.IsNullOrEmpty(task.ExtraAdvancedArguments))
+ else
{
- query += string.Format(" -x {0}", task.ExtraAdvancedArguments);
+ if (!string.IsNullOrEmpty(task.AdvancedEncoderOptions))
+ {
+ query += string.Format(" -x {0}", task.AdvancedEncoderOptions);
+ }
}
return query;
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index f273f3209..f37f9c7ea 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -179,6 +179,11 @@ namespace HandBrakeWPF.ViewModels
this.Task.AdvancedEncoderOptions = this.GetActualx264Query();
}
+ if (!value)
+ {
+ this.Task.AdvancedEncoderOptions = string.Empty;
+ }
+
this.useAdvancedTab = value;
this.Task.ShowAdvancedTab = value;
this.NotifyOfPropertyChange(() => this.UseAdvancedTab);
@@ -513,7 +518,7 @@ namespace HandBrakeWPF.ViewModels
}
set
{
- if (!object.Equals(this.Task.AdvancedEncoderOptions, value))
+ if (!object.Equals(this.Task.ExtraAdvancedArguments, value))
{
this.Task.ExtraAdvancedArguments = value;
this.NotifyOfPropertyChange(() => this.ExtraArguments);