diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 34 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 2 |
3 files changed, 36 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index af9ae9b00..0cecd6229 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -497,7 +497,7 @@ namespace HandBrake.ApplicationServices.Utilities if (task.TwoPass)
query += " -2 ";
- if (task.TurboFirstPass)
+ if (task.TurboFirstPass && task.VideoEncoder == VideoEncoder.X264)
query += " -T ";
if (task.Framerate.HasValue)
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index c729e476e..d358988c5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -37,6 +37,12 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class VideoViewModel : ViewModelBase, IVideoViewModel
{
+ /*
+ * TODO
+ * 1. Refactor the Video Encoder Preset/Tune/Level options to be generic instead of encoder specific.
+ * 2. Model the UI Interactions in a better way.
+ */
+
#region Constants and Fields
/// <summary>
/// Same as source constant.
@@ -128,6 +134,11 @@ namespace HandBrakeWPF.ViewModels /// </summary>
private int x265PresetValue;
+ /// <summary>
+ /// The display turbo first pass.
+ /// </summary>
+ private bool displayTurboFirstPass;
+
#endregion
#region Constructors and Destructors
@@ -565,6 +576,7 @@ namespace HandBrakeWPF.ViewModels this.DisplayH264Options = value == VideoEncoder.X264 || value == VideoEncoder.QuickSync;
this.UseAdvancedTab = value != VideoEncoder.QuickSync && this.UseAdvancedTab;
this.DisplayNonQSVControls = value != VideoEncoder.QuickSync;
+ this.DisplayTurboFirstPass = value == VideoEncoder.X264;
this.NotifyOfPropertyChange(() => this.Rfqp);
this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
@@ -1017,6 +1029,27 @@ namespace HandBrakeWPF.ViewModels /// Gets or sets X265Tunes.
/// </summary>
public IEnumerable<x265Tune> X265Tunes { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether display turbo first pass.
+ /// </summary>
+ public bool DisplayTurboFirstPass
+ {
+ get
+ {
+ return this.displayTurboFirstPass;
+ }
+ set
+ {
+ if (value.Equals(this.displayTurboFirstPass))
+ {
+ return;
+ }
+ this.displayTurboFirstPass = value;
+ this.NotifyOfPropertyChange(() => this.DisplayTurboFirstPass);
+ }
+ }
+
#endregion
#region Public Methods
@@ -1238,6 +1271,7 @@ namespace HandBrakeWPF.ViewModels this.DisplayX264Options = encoder == VideoEncoder.X264;
this.DisplayQSVOptions = encoder == VideoEncoder.QuickSync;
this.DisplayX265Options = encoder == VideoEncoder.X265;
+ this.DisplayTurboFirstPass = encoder == VideoEncoder.X264;
if (encoder == VideoEncoder.QuickSync)
{
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 039625b67..071c1535d 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -113,7 +113,7 @@ <CheckBox Content="2-Pass Encoding" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
IsChecked="{Binding TwoPass}" Margin="0,0,10,0" />
<CheckBox Content="Turbo first pass" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
- IsChecked="{Binding TurboFirstPass}" />
+ IsChecked="{Binding TurboFirstPass}" Visibility="{Binding DisplayTurboFirstPass, Converter={StaticResource boolToVisConverter}}" />
</StackPanel>
</StackPanel>
|