diff options
author | sr55 <[email protected]> | 2014-08-26 22:36:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-08-26 22:36:39 +0000 |
commit | 15417070c594a330923a62f0ab2054c39d3115f4 (patch) | |
tree | bef270e497e506641e4c79a060914a0f40e8f767 /win/CS/HandBrakeWPF/ViewModels | |
parent | 46824299f7139f1ad13426fbb03ad75da02b4f33 (diff) |
WinGui: Only show Turbo First pass checkbox on x264
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6368 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 34 |
1 files changed, 34 insertions, 0 deletions
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)
{
|