From: sr55 Date: Wed, 21 Nov 2018 19:33:09 +0000 (+0000) Subject: WinGui: Disable 2-pass for NVEnc and VCE. this is not implemented. X-Git-Tag: 1.2.0~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4e50d92be27cb15ac448ef796f6471e7d9893d8;p=handbrake WinGui: Disable 2-pass for NVEnc and VCE. this is not implemented. --- diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 92bf9677f..b065755d7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -217,10 +217,32 @@ namespace HandBrakeWPF.ViewModels } this.NotifyOfPropertyChange(() => this.IsConstantQuantity); + this.NotifyOfPropertyChange(() => this.IsTwoPassEnabled); this.OnTabStatusChanged(null); } } + public bool IsTwoPassEnabled + { + get + { + if (this.IsConstantQuantity) + { + return false; + } + + if (this.SelectedVideoEncoder == VideoEncoder.NvencH264 + || this.SelectedVideoEncoder == VideoEncoder.NvencH265 + || this.SelectedVideoEncoder == VideoEncoder.VceH264 + || this.SelectedVideoEncoder == VideoEncoder.VceH265) + { + return false; + } + + return true; + } + } + /// /// Gets or sets a value indicating whether IsPeakFramerate. /// @@ -1511,6 +1533,7 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.Rfqp); this.NotifyOfPropertyChange(() => this.IsAdvancedTabOptionEnabled); this.NotifyOfPropertyChange(() => this.HighQualityLabel); + this.NotifyOfPropertyChange(() => this.IsTwoPassEnabled); // Handle some quicksync specific options. if (selectedEncoder == VideoEncoder.QuickSync || selectedEncoder == VideoEncoder.QuickSyncH265 || selectedEncoder == VideoEncoder.QuickSyncH26510b) @@ -1518,10 +1541,18 @@ namespace HandBrakeWPF.ViewModels this.TwoPass = false; this.TurboFirstPass = false; this.Task.Framerate = null; - this.NotifyOfPropertyChange(() => SelectedFramerate); + this.NotifyOfPropertyChange(() => this.SelectedFramerate); this.UseAdvancedTab = false; } + if (selectedEncoder == VideoEncoder.NvencH264 || selectedEncoder == VideoEncoder.NvencH265 + || selectedEncoder == VideoEncoder.VceH264 + || selectedEncoder == VideoEncoder.VceH265) + { + this.TwoPass = false; + this.TurboFirstPass = false; + } + // Cleanup Extra Arguments // Load the cached arguments. Saves the user from resetting when switching encoders. string result; diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index cfe3b9990..d277ea3ea 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -112,7 +112,7 @@ -