From 79825db0caa3a5d7cd6293eefdc095e7884b1b56 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 29 Jun 2018 21:23:07 +0100 Subject: WinGui: Extend the "Video" preference tab to allow the hardware encoders to be disabled. --- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs') diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 74ac53a85..7c14e1594 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -101,6 +101,8 @@ namespace HandBrakeWPF.ViewModels #region Public Properties + public IUserSettingService UserSettingService => this.userSettingService; + /// /// Gets or sets the current Encode Task. /// @@ -530,17 +532,6 @@ namespace HandBrakeWPF.ViewModels } } - private void HandleRFChange() - { - double displayRF = this.DisplayRF; - if (displayRF > this.QualityMax || displayRF < this.QualityMin) - { - displayRF = this.qualityMax / 2; - } - - this.SetRF(displayRF); - } - /// /// Gets or sets a value indicating whether ShowPeakFramerate. /// @@ -1279,6 +1270,7 @@ namespace HandBrakeWPF.ViewModels if (e.Key == UserSettingConstants.ShowAdvancedTab) { this.NotifyOfPropertyChange(() => this.IsAdvancedTabOptionEnabled); + this.NotifyOfPropertyChange(() => this.VideoEncoders); } } @@ -1507,5 +1499,16 @@ namespace HandBrakeWPF.ViewModels string result; this.ExtraArguments = this.encoderOptions.TryGetValue(EnumHelper.GetShortName(selectedEncoder), out result) ? result : string.Empty; } + + private void HandleRFChange() + { + double displayRF = this.DisplayRF; + if (displayRF > this.QualityMax || displayRF < this.QualityMin) + { + displayRF = this.qualityMax / 2; + } + + this.SetRF(displayRF); + } } } \ No newline at end of file -- cgit v1.2.3