diff options
5 files changed, 67 insertions, 5 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs index 570597176..c8877e6d6 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs @@ -2,6 +2,9 @@ // <copyright file="AudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
+// <summary>
+// The audio encoder enumeration
+// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Model.Encoding
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index ba0031cc6..b1a31d882 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -287,6 +287,31 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Warning: RF 0 is Lossless!.
+ /// </summary>
+ public static string Video_LosslessWarning {
+ get {
+ return ResourceManager.GetString("Video_LosslessWarning", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A value of 0 means lossless and will result in a file size that is larger than the original source,
+ ///unless the source was also lossless.
+ ///
+ ///x264's scale is logarithmic and lower values correspond to higher quality.
+ ///
+ ///So small increases in value will result in progressively larger increases in the resulting file size.
+ ///
+ ///Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition..
+ /// </summary>
+ public static string Video_LosslessWarningTooltip {
+ get {
+ return ResourceManager.GetString("Video_LosslessWarningTooltip", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Set the desired quality factor. The encoder targets a certain quality.
///The scale used by each video encoder is different.
///
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 6265c3fc9..64d5ef562 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -277,4 +277,17 @@ Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Def FFMpeg's and Theora's scale is more linear. These encoders do not have a lossless mode.</value>
</data>
+ <data name="Video_LosslessWarning" xml:space="preserve">
+ <value>Warning: RF 0 is Lossless!</value>
+ </data>
+ <data name="Video_LosslessWarningTooltip" xml:space="preserve">
+ <value>A value of 0 means lossless and will result in a file size that is larger than the original source,
+unless the source was also lossless.
+
+x264's scale is logarithmic and lower values correspond to higher quality.
+
+So small increases in value will result in progressively larger increases in the resulting file size.
+
+Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition.</value>
+ </data>
</root>
\ No newline at end of file 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);
}
}
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 78186238d..c9b125abe 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -79,7 +79,10 @@ <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
<RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>
<TextBlock Text="{Binding DisplayRF}" Width="25" />
- <TextBlock Text="RF" FontWeight="Bold" />
+ <TextBlock Text="{Binding Rfqp}" FontWeight="Bold" />
+
+ <TextBlock Text="{x:Static Properties:Resources.Video_LosslessWarning}" Visibility="{Binding IsLossless, Converter={StaticResource boolToVisConverter}}"
+ Margin="10,0,0,0" ToolTip="{x:Static Properties:Resources.Video_LosslessWarningTooltip}" FontWeight="Bold" />
</StackPanel>
<Slider Width="280" Value="{Binding RF}" HorizontalAlignment="Left" Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"
|