diff options
author | sr55 <[email protected]> | 2013-07-27 19:56:49 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-07-27 19:56:49 +0000 |
commit | 7bddf9d150337398e8040953ff282cd57b1a71c0 (patch) | |
tree | dd4f3941b2a222b10d9c984920a8b04416b7625c /win | |
parent | eff32e1a98421f42caab1a5bc418efb08b9aa3b5 (diff) |
WinGui: Some fixes around the Video and Advanced Tab query generation behaviour.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5674 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 68 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 7 |
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);
|