From 3bb7333006c2ace5e3aaabfc80c5a00dcd92350e Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 29 Dec 2012 14:25:17 +0000 Subject: WinGui: Add the plist keys and fix numerous bugs in the x264 preset/tune/profile/level code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5115 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 20 ++++++++++++++++---- win/CS/HandBrakeWPF/Views/VideoView.xaml | 3 ++- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index c4acd7fa8..b0b46b760 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -388,6 +388,9 @@ namespace HandBrakeWPF.ViewModels // Update the Quality Slider. Make sure the bounds are up to date with the users settings. this.SetQualitySliderBounds(); + + // Hide the x264 controls when not needed. + this.DisplayX264Options = value == VideoEncoder.X264; } } @@ -419,13 +422,13 @@ namespace HandBrakeWPF.ViewModels { get { - return this.extraArguments; + return this.Task.ExtraAdvancedArguments; } set { - if (!object.Equals(this.extraArguments, value)) + if (!object.Equals(this.Task.AdvancedEncoderOptions, value)) { - this.extraArguments = value; + this.Task.ExtraAdvancedArguments = value; this.NotifyOfPropertyChange(() => this.ExtraArguments); } } @@ -705,7 +708,9 @@ namespace HandBrakeWPF.ViewModels : (int)x264Preset.Medium; this.H264Profile = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Profile : x264Profile.None; this.X264Tune = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.X264Tune : x264Tune.None; - this.H264Level = preset.Task.H264Level; + this.H264Level = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Level : "Auto"; + this.FastDecode = preset.Task.VideoEncoder == VideoEncoder.X264 && preset.Task.FastDecode; + this.ExtraArguments = preset.Task.ExtraAdvancedArguments; } } @@ -729,6 +734,13 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.Task.VideoBitrate); this.NotifyOfPropertyChange(() => this.Task.TwoPass); this.NotifyOfPropertyChange(() => this.Task.TurboFirstPass); + + this.NotifyOfPropertyChange(() => this.X264Tune); + this.NotifyOfPropertyChange(() => this.X264Preset); + this.NotifyOfPropertyChange(() => this.H264Level); + this.NotifyOfPropertyChange(() => this.H264Profile); + this.NotifyOfPropertyChange(() => this.FastDecode); + this.NotifyOfPropertyChange(() => this.ExtraArguments); } /// diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index ffc027786..78186238d 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -157,7 +157,8 @@ - -- cgit v1.2.3