diff options
author | sr55 <[email protected]> | 2018-11-21 19:33:09 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2018-11-21 19:33:09 +0000 |
commit | c4e50d92be27cb15ac448ef796f6471e7d9893d8 (patch) | |
tree | fdaa051b9d647843ffde13f3a84f7ce8c585ef5e /win/CS | |
parent | bba8ab2cc42bb493cb3c52a52c17afe97cd75fdd (diff) |
WinGui: Disable 2-pass for NVEnc and VCE. this is not implemented.
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 33 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 2 |
2 files changed, 33 insertions, 2 deletions
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;
+ }
+ }
+
/// <summary>
/// Gets or sets a value indicating whether IsPeakFramerate.
/// </summary>
@@ -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 @@ </StackPanel>
<StackPanel Orientation="Horizontal" Margin="30,0,0,0" Visibility="{Binding DisplayNonQSVControls, Converter={StaticResource boolToVisConverter}}">
- <CheckBox Content="{x:Static Properties:Resources.VideoView_2Pass}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
+ <CheckBox Content="{x:Static Properties:Resources.VideoView_2Pass}" IsEnabled="{Binding IsTwoPassEnabled, Converter={StaticResource boolConverter}}"
IsChecked="{Binding TwoPass}" Margin="0,0,10,0" ToolTip="{x:Static Properties:ResourcesTooltips.Video_TwoPass}" />
<CheckBox Content="{x:Static Properties:Resources.VideoView_TurboFirstPass}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
IsChecked="{Binding TurboFirstPass}" Visibility="{Binding DisplayTurboFirstPass, Converter={StaticResource boolToVisConverter}}"
|