diff options
author | sr55 <[email protected]> | 2019-05-07 19:43:42 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-05-07 19:43:42 +0100 |
commit | 465d9f76d97b973afeece3f87677be0fc8ff9fcd (patch) | |
tree | 432b740fa21276adab0ae3304f8f0f67c6d558b5 /win/CS | |
parent | faf3b92d86d31d261f7017fd311720286cd61dca (diff) |
WinGui: Fix fast decode tune with x264 vs x265. #2083
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 3280b9424..834d4a367 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -610,6 +610,8 @@ namespace HandBrakeWPF.ViewModels }
}
+ public bool DisplayFastDecode { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether display level control.
/// </summary>
@@ -661,10 +663,6 @@ namespace HandBrakeWPF.ViewModels }
set
{
- if (value.Equals(this.fastDecode))
- {
- return;
- }
this.fastDecode = value;
// Update the encode task
@@ -1366,10 +1364,12 @@ namespace HandBrakeWPF.ViewModels this.VideoTunes.Add(VideoTune.None);
foreach (var item in encoder.Tunes)
{
- if (item != VideoTune.FastDecode.ShortName)
+ if (item == VideoTune.FastDecode.ShortName && (selectedEncoder == VideoEncoder.X264 || selectedEncoder == VideoEncoder.X264_10))
{
- this.VideoTunes.Add(new VideoTune(item, item));
+ continue;
}
+
+ this.VideoTunes.Add(new VideoTune(item, item));
}
this.FastDecode = false;
this.VideoTune = VideoTune.None;
@@ -1443,6 +1443,9 @@ namespace HandBrakeWPF.ViewModels this.SelectedVideoEncoder == VideoEncoder.VceH264 || this.SelectedVideoEncoder == VideoEncoder.VceH265 ||
this.SelectedVideoEncoder == VideoEncoder.NvencH264 || this.SelectedVideoEncoder == VideoEncoder.NvencH265;
+ this.DisplayFastDecode = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10;
+ this.NotifyOfPropertyChange(() => this.DisplayFastDecode);
+
this.DisplayProfileControl = this.SelectedVideoEncoder == VideoEncoder.X264
|| this.SelectedVideoEncoder == VideoEncoder.X264_10
|| this.SelectedVideoEncoder == VideoEncoder.X265
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index ec0056f62..77a665c23 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -159,17 +159,17 @@ <TextBlock Text="{x:Static Properties:Resources.VideoView_EncodeTune}" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,5,0,0"
Visibility="{Binding DisplayTuneControls, Converter={StaticResource boolToVisConverter}}"/>
<ComboBox Width="100" Grid.Row="2" Grid.Column="1" Margin="5,5,5,0" Height="22" AutomationProperties.Name="{x:Static Properties:Resources.VideoView_EncodeTune}"
- ItemsSource="{Binding VideoTunes}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoTune}"
+ ItemsSource="{Binding VideoTunes}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoTune}" HorizontalAlignment="Left"
ToolTip="{x:Static Properties:ResourcesTooltips.Video_EncoderTune}" Visibility="{Binding DisplayTuneControls, Converter={StaticResource boolToVisConverter}}"
Style="{StaticResource LongToolTipHolder}" />
<CheckBox IsChecked="{Binding FastDecode}" Content="{x:Static Properties:Resources.VideoView_FastDecode}" Grid.Row="2" Grid.Column="2" Margin="10,5,10,0" VerticalAlignment="Center" VerticalContentAlignment="Center"
- ToolTip="{x:Static Properties:ResourcesTooltips.Video_FastDecode}" Visibility="{Binding DisplayTuneControls, Converter={StaticResource boolToVisConverter}}"/>
+ ToolTip="{x:Static Properties:ResourcesTooltips.Video_FastDecode}" Visibility="{Binding DisplayFastDecode, Converter={StaticResource boolToVisConverter}}"/>
<!-- Row 2-->
<TextBlock Text="{x:Static Properties:Resources.VideoView_EncoderProfile}" Grid.Row="3" Grid.Column="0" Margin="0,5,0,0" VerticalAlignment="Center" Visibility="{Binding DisplayProfileControl, Converter={StaticResource boolToVisConverter}}"/>
<ComboBox Width="100" Grid.Row="3" Grid.Column="1" Margin="5,5,5,0" Height="22" VerticalAlignment="Center" Visibility="{Binding DisplayProfileControl, Converter={StaticResource boolToVisConverter}}"
- ItemsSource="{Binding VideoProfiles}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoProfile}"
+ ItemsSource="{Binding VideoProfiles}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoProfile}" HorizontalAlignment="Left"
Style="{StaticResource LongToolTipHolder}" ToolTip="{x:Static Properties:ResourcesTooltips.Video_Profile}"
AutomationProperties.Name="{x:Static Properties:Resources.VideoView_EncoderProfile}" />
|