summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-12-02 20:49:43 +0000
committersr55 <[email protected]>2018-12-02 20:49:43 +0000
commit7b3201f5417bb7c0af983d011a09b6adae678485 (patch)
tree57d7ad8cee4dda751101e2e2af47e90dcc3905c9 /win/CS/HandBrakeWPF
parent6c560316239a5e96754e315e0dba805020bf3e9d (diff)
WinGui: Completely hide the 2pass control for all hardware encoders.
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs26
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml2
2 files changed, 12 insertions, 16 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index 8fb1018ec..03863bd1e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -62,7 +62,6 @@ namespace HandBrakeWPF.ViewModels
private bool displayTurboFirstPass;
private int videoPresetMaxValue;
private int videoPresetValue;
- private bool displayNonQsvControls;
private VideoTune videoTune;
private bool fastDecode;
private bool displayTuneControls;
@@ -234,7 +233,10 @@ namespace HandBrakeWPF.ViewModels
if (this.SelectedVideoEncoder == VideoEncoder.NvencH264
|| this.SelectedVideoEncoder == VideoEncoder.NvencH265
|| this.SelectedVideoEncoder == VideoEncoder.VceH264
- || this.SelectedVideoEncoder == VideoEncoder.VceH265)
+ || this.SelectedVideoEncoder == VideoEncoder.VceH265
+ || this.SelectedVideoEncoder == VideoEncoder.QuickSync
+ || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265
+ || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH26510b)
{
return false;
}
@@ -620,21 +622,16 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Gets or sets a value indicating whether display non qsv controls.
/// </summary>
- public bool DisplayNonQSVControls
+ public bool DisplayTwoPass
{
get
{
- return this.displayNonQsvControls;
- }
+ return this.SelectedVideoEncoder != VideoEncoder.QuickSync
+ && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH265
+ && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH26510b
+ && this.SelectedVideoEncoder != VideoEncoder.NvencH264
+ && this.SelectedVideoEncoder != VideoEncoder.NvencH265;
- set
- {
- if (value.Equals(this.displayNonQsvControls))
- {
- return;
- }
- this.displayNonQsvControls = value;
- this.NotifyOfPropertyChange(() => this.DisplayNonQSVControls);
}
}
@@ -1503,8 +1500,6 @@ namespace HandBrakeWPF.ViewModels
this.SelectedVideoEncoder == VideoEncoder.NvencH264 || this.SelectedVideoEncoder == VideoEncoder.NvencH265 ||
this.SelectedVideoEncoder == VideoEncoder.VP8 || this.SelectedVideoEncoder == VideoEncoder.VP9;
- this.DisplayNonQSVControls = this.SelectedVideoEncoder != VideoEncoder.QuickSync && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH265 && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH26510b;
-
this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264 || selectedEncoder == VideoEncoder.X264_10 ||
selectedEncoder == VideoEncoder.X265 || selectedEncoder == VideoEncoder.X265_10 || selectedEncoder == VideoEncoder.X265_12;
@@ -1534,6 +1529,7 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.IsAdvancedTabOptionEnabled);
this.NotifyOfPropertyChange(() => this.HighQualityLabel);
this.NotifyOfPropertyChange(() => this.IsTwoPassEnabled);
+ this.NotifyOfPropertyChange(() => this.DisplayTwoPass);
// Handle some quicksync specific options.
if (selectedEncoder == VideoEncoder.QuickSync || selectedEncoder == VideoEncoder.QuickSyncH265 || selectedEncoder == VideoEncoder.QuickSyncH26510b)
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml
index 6a41a4a1f..368eb0982 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml
@@ -111,7 +111,7 @@
ToolTip="{x:Static Properties:ResourcesTooltips.Video_AvgBitrate}" AutomationProperties.Name="{x:Static Properties:Resources.VideoView_AverageBitrate}" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Margin="30,0,0,0" Visibility="{Binding DisplayNonQSVControls, Converter={StaticResource boolToVisConverter}}">
+ <StackPanel Orientation="Horizontal" Margin="30,0,0,0" Visibility="{Binding DisplayTwoPass, Converter={StaticResource boolToVisConverter}}">
<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}"