--- /dev/null
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="x264QueueTooltipConverter.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 x 264 queue tooltip converter.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Converters.Video\r
+{\r
+ using System;\r
+ using System.Globalization;\r
+ using System.Windows.Data;\r
+\r
+ using HandBrake.ApplicationServices.Model;\r
+ using HandBrake.ApplicationServices.Utilities;\r
+ using HandBrake.Interop.Model.Encoding;\r
+ using HandBrake.Interop.Model.Encoding.x264;\r
+\r
+ /// <summary>\r
+ /// The x 264 queue tooltip converter.\r
+ /// </summary>\r
+ public class EncoderOptionsTooltipConverter : IValueConverter\r
+ {\r
+ /// <summary>\r
+ /// Converts a value. \r
+ /// </summary>\r
+ /// <returns>\r
+ /// A converted value. If the method returns null, the valid null value is used.\r
+ /// </returns>\r
+ /// <param name="value">The value produced by the binding source.</param><param name="targetType">The type of the binding target property.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param>\r
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r
+ {\r
+ EncodeTask task = value as EncodeTask;\r
+ if (task != null && task.VideoEncoder == VideoEncoder.X264)\r
+ {\r
+ if (task.ShowAdvancedTab)\r
+ {\r
+ return task.AdvancedEncoderOptions;\r
+ }\r
+\r
+ return string.Format("Preset: {0}{5}Tune: {1}{5}Profile: {2}{5}Level: {3}{5}Extra Arguments: {4}{5}", \r
+ EnumHelper<x264Preset>.GetDisplay(task.X264Preset),\r
+ EnumHelper<x264Tune>.GetDisplay(task.X264Tune),\r
+ task.H264Profile,\r
+ task.H264Level, \r
+ string.IsNullOrEmpty(task.ExtraAdvancedArguments) ? "None" : task.ExtraAdvancedArguments,\r
+ Environment.NewLine);\r
+ }\r
+\r
+ return task != null ? task.AdvancedEncoderOptions.Trim() : string.Empty;\r
+ }\r
+\r
+ /// <summary>\r
+ /// Converts a value. \r
+ /// </summary>\r
+ /// <returns>\r
+ /// A converted value. If the method returns null, the valid null value is used.\r
+ /// </returns>\r
+ /// <param name="value">The value that is produced by the binding target.</param><param name="targetType">The type to convert to.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param>\r
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r
+ {\r
+ throw new NotImplementedException();\r
+ }\r
+ }\r
+}\r