summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-01-06 19:45:04 +0000
committersr55 <[email protected]>2013-01-06 19:45:04 +0000
commit4dfd0131c7ae509122f13ecc775decc970ef3a89 (patch)
tree514222fd72a3d5217d5d2bf5264e510716ea7ada /win/CS/HandBrakeWPF/ViewModels
parente133bd8b716c17abc3c49e3acb9f20ad2a090a99 (diff)
WinGui: Restore RF0 warning and Correctly show RF or QP depending on the video encoder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5159 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index b0b46b760..6164e3603 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -23,12 +23,10 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop;
- using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
using HandBrakeWPF.Commands.Interfaces;
- using HandBrakeWPF.Properties;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -241,6 +239,17 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Gets a value indicating whether is lossless.
+ /// </summary>
+ public bool IsLossless
+ {
+ get
+ {
+ return 51.Equals(this.RF);
+ }
+ }
+
+ /// <summary>
/// Gets or sets QualityMax.
/// </summary>
public int QualityMax
@@ -303,8 +312,6 @@ namespace HandBrakeWPF.ViewModels
double rfValue = 51.0 - value * cqStep;
rfValue = Math.Round(rfValue, 2);
this.Task.Quality = rfValue;
-
- // TODO: Lossless warning.
break;
case VideoEncoder.Theora:
Task.Quality = value;
@@ -313,6 +320,7 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.RF);
this.NotifyOfPropertyChange(() => this.DisplayRF);
+ this.NotifyOfPropertyChange(() => this.IsLossless);
}
}
@@ -327,6 +335,14 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public string Rfqp
+ {
+ get
+ {
+ return this.SelectedVideoEncoder == VideoEncoder.X264 ? "RF" : "QP";
+ }
+ }
+
/// <summary>
/// Gets or sets SelectedFramerate.
/// </summary>
@@ -391,6 +407,8 @@ namespace HandBrakeWPF.ViewModels
// Hide the x264 controls when not needed.
this.DisplayX264Options = value == VideoEncoder.X264;
+
+ this.NotifyOfPropertyChange(() => this.Rfqp);
}
}