// <copyright file="AudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">\r
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
// </copyright>\r
+// <summary>\r
+// The audio encoder enumeration\r
+// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
namespace HandBrake.Interop.Model.Encoding\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Warning: RF 0 is Lossless!.\r
+ /// </summary>\r
+ public static string Video_LosslessWarning {\r
+ get {\r
+ return ResourceManager.GetString("Video_LosslessWarning", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// 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, \r
+ ///unless the source was also lossless. \r
+ ///\r
+ ///x264's scale is logarithmic and lower values correspond to higher quality. \r
+ ///\r
+ ///So small increases in value will result in progressively larger increases in the resulting file size. \r
+ ///\r
+ ///Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition..\r
+ /// </summary>\r
+ public static string Video_LosslessWarningTooltip {\r
+ get {\r
+ return ResourceManager.GetString("Video_LosslessWarningTooltip", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to Set the desired quality factor. The encoder targets a certain quality. \r
///The scale used by each video encoder is different.\r
\r
FFMpeg's and Theora's scale is more linear. These encoders do not have a lossless mode.</value>\r
</data>\r
+ <data name="Video_LosslessWarning" xml:space="preserve">\r
+ <value>Warning: RF 0 is Lossless!</value>\r
+ </data>\r
+ <data name="Video_LosslessWarningTooltip" xml:space="preserve">\r
+ <value>A value of 0 means lossless and will result in a file size that is larger than the original source, \r
+unless the source was also lossless. \r
+\r
+x264's scale is logarithmic and lower values correspond to higher quality. \r
+\r
+So small increases in value will result in progressively larger increases in the resulting file size. \r
+\r
+Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition.</value>\r
+ </data>\r
</root>
\ No newline at end of file
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop;\r
- using HandBrake.Interop.HbLib;\r
using HandBrake.Interop.Model.Encoding;\r
using HandBrake.Interop.Model.Encoding.x264;\r
\r
using HandBrakeWPF.Commands.Interfaces;\r
- using HandBrakeWPF.Properties;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
/// <summary>\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets a value indicating whether is lossless.\r
+ /// </summary>\r
+ public bool IsLossless\r
+ {\r
+ get\r
+ {\r
+ return 51.Equals(this.RF);\r
+ }\r
+ }\r
+\r
/// <summary>\r
/// Gets or sets QualityMax.\r
/// </summary>\r
double rfValue = 51.0 - value * cqStep;\r
rfValue = Math.Round(rfValue, 2);\r
this.Task.Quality = rfValue;\r
-\r
- // TODO: Lossless warning.\r
break;\r
case VideoEncoder.Theora:\r
Task.Quality = value;\r
\r
this.NotifyOfPropertyChange(() => this.RF);\r
this.NotifyOfPropertyChange(() => this.DisplayRF);\r
+ this.NotifyOfPropertyChange(() => this.IsLossless);\r
}\r
}\r
\r
}\r
}\r
\r
+ public string Rfqp\r
+ {\r
+ get\r
+ {\r
+ return this.SelectedVideoEncoder == VideoEncoder.X264 ? "RF" : "QP";\r
+ }\r
+ }\r
+\r
/// <summary>\r
/// Gets or sets SelectedFramerate.\r
/// </summary>\r
\r
// Hide the x264 controls when not needed.\r
this.DisplayX264Options = value == VideoEncoder.X264;\r
+\r
+ this.NotifyOfPropertyChange(() => this.Rfqp);\r
}\r
}\r
\r
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >\r
<RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>\r
<TextBlock Text="{Binding DisplayRF}" Width="25" />\r
- <TextBlock Text="RF" FontWeight="Bold" />\r
+ <TextBlock Text="{Binding Rfqp}" FontWeight="Bold" />\r
+\r
+ <TextBlock Text="{x:Static Properties:Resources.Video_LosslessWarning}" Visibility="{Binding IsLossless, Converter={StaticResource boolToVisConverter}}" \r
+ Margin="10,0,0,0" ToolTip="{x:Static Properties:Resources.Video_LosslessWarningTooltip}" FontWeight="Bold" />\r
</StackPanel>\r
\r
<Slider Width="280" Value="{Binding RF}" HorizontalAlignment="Left" Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"\r