]> granicus.if.org Git - handbrake/commitdiff
WinGui: Initial work to implement x264 Preset/Tune/Profile/Level options in-gui.
authorsr55 <sr55.hb@outlook.com>
Fri, 28 Dec 2012 11:21:14 +0000 (11:21 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 28 Dec 2012 11:21:14 +0000 (11:21 +0000)
Still some stuff to tidy up but should be usable for now.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5113 b64f7644-9d1e-0410-96f1-a4d463321fa5

25 files changed:
win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
win/CS/HandBrake.ApplicationServices/Services/Encode.cs
win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Preset.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Tune.cs
win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
win/CS/HandBrakeWPF/UserSettingConstants.cs
win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/HandBrakeWPF/Views/VideoView.xaml
win/CS/HandBrakeWPF/defaultsettings.xml

index e7869459b5465a502cdc32a4c06fd1271e0ebe2b..9f5c043a04f65c8b6f78d2827fe2528e2d03e416 100644 (file)
@@ -34,8 +34,8 @@ namespace HandBrake.ApplicationServices.Model
             this.SubtitleTracks = new ObservableCollection<SubtitleTrack>();\r
             this.ChapterNames = new ObservableCollection<ChapterMarker>();\r
             this.AllowedPassthruOptions = new AllowedPassthru();\r
-            this.x264Preset = x264Preset.None;\r
-            this.x264Profile = x264Profile.None;\r
+            this.X264Preset = x264Preset.Medium;\r
+            this.H264Profile = x264Profile.None;\r
             this.X264Tune = x264Tune.None;\r
             this.Modulus = 16;\r
         }\r
@@ -60,7 +60,6 @@ namespace HandBrake.ApplicationServices.Model
                 this.AudioTracks.Add(new AudioTrack(track));\r
             }\r
 \r
-\r
             this.ChapterNames = new ObservableCollection<ChapterMarker>();\r
             foreach (ChapterMarker track in task.ChapterNames)\r
             {\r
@@ -115,9 +114,10 @@ namespace HandBrake.ApplicationServices.Model
             this.VideoEncoder = task.VideoEncoder;\r
             this.VideoEncodeRateType = task.VideoEncodeRateType;\r
             this.Width = task.Width;\r
-            this.x264Preset = task.x264Preset;\r
-            this.x264Profile = task.x264Profile;\r
+            this.X264Preset = task.X264Preset;\r
+            this.H264Profile = task.H264Profile;\r
             this.X264Tune = task.X264Tune;\r
+            this.FastDecode = task.FastDecode;\r
 \r
             this.PreviewStartAt = task.PreviewStartAt;\r
             this.PreviewDuration = task.PreviewDuration;\r
@@ -399,18 +399,28 @@ namespace HandBrake.ApplicationServices.Model
         /// <summary>\r
         /// Gets or sets x264Preset.\r
         /// </summary>\r
-        public x264Preset x264Preset { get; set; }\r
+        public x264Preset X264Preset { get; set; }\r
 \r
         /// <summary>\r
         /// Gets or sets x264Profile.\r
         /// </summary>\r
-        public x264Profile x264Profile { get; set; }\r
+        public x264Profile H264Profile { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the x 264 level.\r
+        /// </summary>\r
+        public string H264Level { get; set; }\r
 \r
         /// <summary>\r
         /// Gets or sets X264Tune.\r
         /// </summary>\r
         public x264Tune X264Tune { get; set; }\r
 \r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether fast decode.\r
+        /// </summary>\r
+        public bool FastDecode { get; set; }\r
+\r
         #endregion\r
 \r
         #region Preview\r
index 0c35c8f413286ef773ccd17cdf170587aeaecac0..ce75267c52ab8c50c7e7fa4d4085d6c25a445fd8 100644 (file)
@@ -67,8 +67,7 @@ namespace HandBrake.ApplicationServices.Services
             : base(userSettingService)\r
         {\r
             this.userSettingService = userSettingService;\r
-            this.EncodeStarted += this.EncodeEncodeStarted;\r
-            \r
+            this.EncodeStarted += this.EncodeEncodeStarted;     \r
         }\r
 \r
         #region Properties\r
index 0638a8e285ec875f220ec812d1ddfe9701bc5dba..46e696ca1ef383c673e18131ac0376a018e4b4e9 100644 (file)
@@ -470,8 +470,6 @@ namespace HandBrake.ApplicationServices.Utilities
                     return x264Tune.Ssim;\r
                 case "fastdecode":\r
                     return x264Tune.Fastdecode;\r
-                case "zerolatency":\r
-                    return x264Tune.Zerolatency;\r
                 default:\r
                     return x264Tune.Film;\r
             }\r
index a6dc977581ce42a62ef66ba4141d3d3203d07be2..b6fc06fafa4c25edbe68c27313472043066b4bce 100644 (file)
@@ -45,6 +45,11 @@ namespace HandBrake.ApplicationServices.Utilities
         /// </returns>\r
         public static string GenerateQuery(EncodeTask task, int previewScanCount, int verbosity, bool disableLibDvdNav)\r
         {\r
+            if (string.IsNullOrEmpty(task.Source))\r
+            {\r
+                return "No source selected";\r
+            }\r
+\r
             string query = string.Empty;\r
             query += SourceQuery(task, null, null, previewScanCount);\r
             query += DestinationQuery(task);\r
@@ -898,19 +903,37 @@ namespace HandBrake.ApplicationServices.Utilities
             {\r
                 string query = string.Empty; \r
 \r
-                if (task.x264Preset != x264Preset.None)\r
+                if (task.X264Preset != x264Preset.Medium)\r
                 {\r
-                    query += string.Format("--x264-preset={0} ", task.x264Preset.ToString().ToLower().Replace(" ", string.Empty));\r
+                    query += string.Format(" --x264-preset={0} ", task.X264Preset.ToString().ToLower().Replace(" ", string.Empty));\r
                 }\r
 \r
-                if (task.x264Profile != x264Profile.None)\r
+                if (task.H264Profile != x264Profile.None)\r
                 {\r
-                    query += string.Format("--x264-profile={0} ", task.x264Profile.ToString().ToLower().Replace(" ", string.Empty));\r
+                    query += string.Format(" --x264-profile={0} ", task.H264Profile.ToString().ToLower().Replace(" ", string.Empty));\r
                 }\r
 \r
                 if (task.X264Tune != x264Tune.None)\r
                 {\r
-                    query += string.Format("--x264-tune={0} ", task.X264Tune.ToString().ToLower().Replace(" ", string.Empty));\r
+                    string tune = string.Empty;\r
+\r
+                    if (task.FastDecode)\r
+                    {\r
+                        tune = "fastdecode";\r
+                    }\r
+\r
+                    string tuneDropdown = task.X264Tune.ToString().ToLower().Replace(" ", string.Empty);\r
+                    if (task.X264Tune != x264Tune.None && !string.IsNullOrEmpty(tuneDropdown))\r
+                    {\r
+                        tune = string.IsNullOrEmpty(tune) ? tuneDropdown : string.Format(",{0}", tuneDropdown);  \r
+                    }\r
+\r
+                    query += string.Format(" --x264-tune=\"{0}\" ", tune);\r
+                }\r
+\r
+                if (task.H264Level != "Auto")\r
+                {\r
+                    query += string.Format(" --h264-level=\"{0}\" ", task.H264Level);\r
                 }\r
 \r
                 if (!string.IsNullOrEmpty(task.AdvancedEncoderOptions))\r
index f0b5d65e3e7469a9f87f7d2d2f5116b3aac9553f..eae37e2b5ba14598dd2666e0a860f55044df9e1e 100644 (file)
@@ -91,12 +91,9 @@ namespace HandBrake.ApplicationServices.Utilities
             Match turboFirstPass = Regex.Match(input, @" -T");\r
             Match optimizeMP4 = Regex.Match(input, @" -O");\r
             Match pfr = Regex.Match(input, @" --pfr");\r
-            Match vfr = Regex.Match(input, @" --vfr");\r
             Match cfr = Regex.Match(input, @" --cfr");\r
 \r
             // Audio Settings Tab\r
-            Match noAudio = Regex.Match(input, @"-a none");\r
-            Match audioTracks = Regex.Match(input, @"-a ([0-9,]+)");\r
             Match audioTrackMixes = Regex.Match(input, @"-6 ([0-9a-zA-Z,]+)");\r
             Match audioEncoders = Regex.Match(input, @"-E ([a-zA-Z0-9+,:\*]+)");\r
             Match audioBitrates = Regex.Match(input, @"-B ([0-9a-zA-Z,]+)"); // Auto = a-z\r
@@ -112,9 +109,11 @@ namespace HandBrake.ApplicationServices.Utilities
 \r
             // Advanced Tab\r
             Match advanced = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)");\r
-            Match x264Preset = Regex.Match(input, @"--x264-preset([=a-zA-Z0-9\s]*)");\r
-            Match x264Tune = Regex.Match(input, @"--x264-tune([=a-zA-Z0-9\s]*)");\r
-            Match x264Profile = Regex.Match(input, @"--x264-profile([=a-zA-Z0-9\s]*)");\r
+            Match x264Preset = Regex.Match(input, @"--x264-preset([=a-zA-Z0-9\s ]*)");\r
+            Match x264Tune = Regex.Match(input, @"--x264-tune([=,a-zA-Z0-9\s ]*)");\r
+            Match h264Profile = Regex.Match(input, @"--h264-profile([=a-zA-Z0-9\s ]*)");\r
+            Match x264Profile = Regex.Match(input, @"--x264-profile([=a-zA-Z0-9\s ]*)");\r
+            Match h264Level = Regex.Match(input, @"--h264-level([=a-zA-Z0-9.\s ]*)");\r
 \r
             #endregion\r
 \r
@@ -243,7 +242,6 @@ namespace HandBrake.ApplicationServices.Utilities
                             parsed.CustomDecomb = value;\r
                             parsed.Decomb = parsed.CustomDecomb == "7:2:6:9:1:80" ? Decomb.Fast : Decomb.Custom;\r
                         }\r
-\r
                     }\r
                 }\r
 \r
@@ -364,7 +362,6 @@ namespace HandBrake.ApplicationServices.Utilities
                 }\r
 \r
                 // Get the data from the regular expression results\r
-                string[] trackData = null;\r
                 string[] trackMixes = null;\r
                 string[] trackEncoders = null;\r
                 string[] trackBitrates = null;\r
@@ -372,8 +369,6 @@ namespace HandBrake.ApplicationServices.Utilities
                 string[] trackDRCvalues = null;\r
                 string[] trackGainValues = null;\r
 \r
-                if (audioTracks.Success)\r
-                    trackData = audioTracks.ToString().Replace("-a ", string.Empty).Split(',');\r
                 if (audioTrackMixes.Success)\r
                     trackMixes = audioTrackMixes.ToString().Replace("-6 ", string.Empty).Split(',');\r
                 if (audioEncoders.Success)\r
@@ -392,9 +387,6 @@ namespace HandBrake.ApplicationServices.Utilities
                 for (int x = 0; x < encoderCount; x++)\r
                 {\r
                     AudioTrack track = new AudioTrack();\r
-                    //if (trackData != null)\r
-                    //    if (trackData.Length >= (x + 1)) // Audio Track\r
-                    //        track.ScannedTrack = trackData[x].Trim();\r
 \r
                     if (trackMixes != null)\r
                         if (trackMixes.Length >= (x + 1)) // Audio Mix\r
@@ -457,17 +449,35 @@ namespace HandBrake.ApplicationServices.Utilities
                     parsed.AdvancedEncoderOptions = advanced.ToString().Replace("-x ", string.Empty);\r
 \r
                 if (x264Preset.Success)\r
-                    parsed.x264Preset =\r
+                    parsed.X264Preset =\r
                         Converters.Getx264PresetFromCli(x264Preset.ToString().Replace("--x264-preset", string.Empty).Replace("=", string.Empty).Trim());\r
 \r
+                if (h264Profile.Success)\r
+                    parsed.H264Profile =\r
+                        Converters.Getx264ProfileFromCli(h264Profile.ToString().Replace("--h264-profile", string.Empty).Replace("=", string.Empty).Trim());\r
+\r
                 if (x264Profile.Success)\r
-                    parsed.x264Profile =\r
-                        Converters.Getx264ProfileFromCli(x264Profile.ToString().Replace("--x264-profile", string.Empty).Replace("=", string.Empty).Trim());\r
+                    parsed.H264Profile =\r
+                       Converters.Getx264ProfileFromCli(x264Profile.ToString().Replace("--x264-profile", string.Empty).Replace("=", string.Empty).Trim());\r
+\r
+                if (h264Level.Success)\r
+                    parsed.H264Level =\r
+                        h264Level.ToString().Replace("--h264-level", string.Empty).Replace("=", string.Empty).Trim();\r
 \r
                 if (x264Tune.Success)\r
-                    parsed.X264Tune =\r
-                        Converters.Getx264TuneFromCli(x264Tune.ToString().Replace("--x264-tune", string.Empty).Replace("=", string.Empty).Trim());\r
+                {\r
+                    string tuneOptions =\r
+                        x264Tune.ToString().Replace("--x264-tune", string.Empty).Replace("=", string.Empty).Trim();\r
 \r
+                    parsed.FastDecode = tuneOptions.Contains("fastdecode");\r
+\r
+                    // Remove these options. They are not in the dropdown.\r
+                    tuneOptions = tuneOptions.Replace("fastdecode", string.Empty).Replace(\r
+                        ",", string.Empty);\r
+\r
+                    parsed.X264Tune = Converters.Getx264TuneFromCli(tuneOptions);\r
+                }\r
+                  \r
                 #endregion\r
             }\r
             catch (Exception exc)\r
index d0bb915a4ef8d08fc546df0b74ebfdd49f4f4732..f68c293e5334f59b3b5efb27acbdfaa842b6a301 100644 (file)
@@ -16,9 +16,6 @@ namespace HandBrake.Interop.Model.Encoding.x264
     /// </summary>\r
     public enum x264Preset\r
     {\r
-        [Display(Name = "None")]\r
-        None = 0,\r
-\r
         [Display(Name = "Ultrafast")]\r
         Ultrafast,\r
 \r
index 9cbce6161c4997455b92aeac70fb4cfb638cd7d3..e82d772d6cdbcf0fb54edf627a9ebdb096d578a0 100644 (file)
@@ -16,7 +16,7 @@ namespace HandBrake.Interop.Model.Encoding.x264
     /// </summary>\r
     public enum x264Profile\r
     {\r
-        [Display(Name = "None")]\r
+        [Display(Name = "Auto")]\r
         None = 0,\r
 \r
         [Display(Name = "Baseline")]\r
index 60421cc0280ea9a4e30a03b687aa18ecc9afaf44..1ae23c437080020224eb2b8d28bb37ad0a72f8a5 100644 (file)
@@ -39,8 +39,5 @@ namespace HandBrake.Interop.Model.Encoding.x264
 \r
         [Display(Name = "Fast Decode")]\r
         Fastdecode,\r
-\r
-        [Display(Name = "Zero Latency")]\r
-        Zerolatency,\r
     }\r
 }\r
diff --git a/win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs b/win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs
new file mode 100644 (file)
index 0000000..bb78e1c
--- /dev/null
@@ -0,0 +1,40 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="AdvancedEncoderOptionsCommand.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
+//   A Command for resetting the video / advnaced tabs encoder options.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Commands\r
+{\r
+    using Caliburn.Micro;\r
+\r
+    using HandBrakeWPF.Commands.Interfaces;\r
+    using HandBrakeWPF.ViewModels.Interfaces;\r
+\r
+    /// <summary>\r
+    /// A Command for resetting the video / advnaced tabs encoder options.\r
+    /// </summary>\r
+    public class AdvancedEncoderOptionsCommand : IAdvancedEncoderOptionsCommand\r
+    {\r
+        /// <summary>\r
+        /// Clear out the advanced options\r
+        /// </summary>\r
+        public void ExecuteClearAdvanced()\r
+        {\r
+            IAdvancedViewModel advancedViewModel = IoC.Get<IAdvancedViewModel>();\r
+            advancedViewModel.Clear();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Clear the advanced encoder options out on the video tab.\r
+        /// </summary>\r
+        public void ExecuteClearVideo()\r
+        {\r
+            IVideoViewModel videoViewModel = IoC.Get<IVideoViewModel>();\r
+            videoViewModel.ClearAdvancedSettings();\r
+        }\r
+    }\r
+}\r
diff --git a/win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs b/win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs
new file mode 100644 (file)
index 0000000..5f0c96f
--- /dev/null
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="IAdvancedEncoderOptionsCommand.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 AdvancedEncoderOptionsCommand interface.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Commands.Interfaces\r
+{\r
+    /// <summary>\r
+    /// The AdvancedEncoderOptionsCommand interface.\r
+    /// </summary>\r
+    public interface IAdvancedEncoderOptionsCommand\r
+    {\r
+        /// <summary>\r
+        /// Clear out the advanced options\r
+        /// </summary>\r
+        void ExecuteClearAdvanced();\r
+\r
+        /// <summary>\r
+        /// Clear the advanced encoder options out on the video tab.\r
+        /// </summary>\r
+        void ExecuteClearVideo();\r
+    }\r
+}
\ No newline at end of file
index 2d6aa98965b7550fd8f29f18b0b0a3b1efb959f5..4b3afd937da698d69005899db36a8c9663a3fb7d 100644 (file)
     </ApplicationDefinition>\r
     <Compile Include="AttachedProperties\MenuItemExtensions.cs" />\r
     <Compile Include="Commands\CancelScanCommand.cs" />\r
+    <Compile Include="Commands\Interfaces\IAdvancedEncoderOptionsCommand.cs" />\r
     <Compile Include="Commands\ProcessShortcutCommand.cs" />\r
     <Compile Include="Commands\SourceMenuCommand.cs" />\r
+    <Compile Include="Commands\AdvancedEncoderOptionsCommand.cs" />\r
     <Compile Include="Controls\Loading.xaml.cs">\r
       <DependentUpon>Loading.xaml</DependentUpon>\r
     </Compile>\r
     <Compile Include="Converters\Options\OptionsTabConverter.cs" />\r
     <Compile Include="Converters\Subtitles\SubtitlesQueueDisplayConverter.cs" />\r
     <Compile Include="Converters\Video\VideoEncoderConverter.cs" />\r
+    <Compile Include="Helpers\GrayscaleImage.cs" />\r
     <Compile Include="Helpers\GrowlCommunicator.cs" />\r
     <Compile Include="Services\DriveDetectService.cs" />\r
     <Compile Include="Services\EncodeServiceWrapper.cs" />\r
index 0978c2fca52c20d25bc2e03f429174a4f9880ea0..ba0031cc667819402fd7308a510423421c4e4b7b 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿//------------------------------------------------------------------------------\r
 // <auto-generated>\r
 //     This code was generated by a tool.\r
-//     Runtime Version:4.0.30319.269\r
+//     Runtime Version:4.0.30319.296\r
 //\r
 //     Changes to this file may cause incorrect behavior and will be lost if\r
 //     the code is regenerated.\r
@@ -285,5 +285,85 @@ namespace HandBrakeWPF.Properties {
                 return ((System.Drawing.Bitmap)(obj));\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
+        ///x264&apos;s scale is logarithmic and lower values correspond to higher quality. \r
+        ///So small increases in value will result in progressively larger increases in the resulting file size. \r
+        ///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
+        ///Suggested values are: 18 to 20 for Standard Definition and 20 t [rest of string was truncated]&quot;;.\r
+        /// </summary>\r
+        public static string Video_QualitySlider {\r
+            get {\r
+                return ResourceManager.GetString("Video_QualitySlider", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to The full x264 list of parameters: {0}.\r
+        /// </summary>\r
+        public static string Video_x264ExtraArgs {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264ExtraArgs", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Reduce decoder CPU usage.\r
+        ///\r
+        ///Set this if your device is struggling to play the output. (i.e. dropped frames).\r
+        /// </summary>\r
+        public static string Video_x264FastDecode {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264FastDecode", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Sets and ensures compliance with the specified H.264 Levels. This will override all other settings..\r
+        /// </summary>\r
+        public static string Video_x264Level {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264Level", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Adjusts x264 settings to trade off compression efficiency against encoding speed.\r
+        ///\r
+        ///This establishes your default x264 settings. Tunes, profiles, levels and advanced options string will be applied to this.\r
+        ///\r
+        ///You should generally set this option to the slowest you can bear since slower settings will result in better quality or smaller files..\r
+        /// </summary>\r
+        public static string Video_x264Preset {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264Preset", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Limit the H.264 profile of the output stream. This will override all other settings..\r
+        /// </summary>\r
+        public static string Video_x264Profile {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264Profile", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Tune settings to optimise for common scenarios\r
+        ///\r
+        ///This can improve efficiency for particular source characteristics or set of characteristics of the output file.\r
+        ///\r
+        ///Changes will be applied after the preset but before all other parameters..\r
+        /// </summary>\r
+        public static string Video_x264Tune {\r
+            get {\r
+                return ResourceManager.GetString("Video_x264Tune", resourceCulture);\r
+            }\r
+        }\r
     }\r
 }\r
index 9c92427cbc0248d646c200a418c9a2e8aa856479..6265c3fc967e39ae061eec15a5448ea66896cf0d 100644 (file)
@@ -237,4 +237,44 @@ may have problems with Weighted P-frame prediction: the Apple TV is completely i
   <data name="logo64" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
     <value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
   </data>\r
+  <data name="Video_x264ExtraArgs" xml:space="preserve">\r
+    <value>The full x264 list of parameters: {0}</value>\r
+  </data>\r
+  <data name="Video_x264FastDecode" xml:space="preserve">\r
+    <value>Reduce decoder CPU usage.\r
+\r
+Set this if your device is struggling to play the output. (i.e. dropped frames)</value>\r
+  </data>\r
+  <data name="Video_x264Level" xml:space="preserve">\r
+    <value>Sets and ensures compliance with the specified H.264 Levels. This will override all other settings.</value>\r
+  </data>\r
+  <data name="Video_x264Preset" xml:space="preserve">\r
+    <value>Adjusts x264 settings to trade off compression efficiency against encoding speed.\r
+\r
+This establishes your default x264 settings. Tunes, profiles, levels and advanced options string will be applied to this.\r
+\r
+You should generally set this option to the slowest you can bear since slower settings will result in better quality or smaller files.</value>\r
+  </data>\r
+  <data name="Video_x264Profile" xml:space="preserve">\r
+    <value>Limit the H.264 profile of the output stream. This will override all other settings.</value>\r
+  </data>\r
+  <data name="Video_x264Tune" xml:space="preserve">\r
+    <value>Tune settings to optimise for common scenarios\r
+\r
+This can improve efficiency for particular source characteristics or set of characteristics of the output file.\r
+\r
+Changes will be applied after the preset but before all other parameters.</value>\r
+  </data>\r
+  <data name="Video_QualitySlider" xml:space="preserve">\r
+    <value>Set the desired quality factor. The encoder targets a certain quality. \r
+The scale used by each video encoder is different.\r
+\r
+x264's scale is logarithmic and lower values correspond to higher quality. \r
+So small increases in value will result in progressively larger increases in the resulting file size. \r
+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
+Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition.\r
+\r
+FFMpeg's and Theora's scale is more linear. These encoders do not have a lossless mode.</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 24666874c84a4d74700e57ec251d0c79816abfe9..5b06c97ba8893aab5b918413a3419071200ae3c2 100644 (file)
@@ -23,6 +23,9 @@ namespace HandBrakeWPF.Startup
     using HandBrake.ApplicationServices;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
+    using HandBrakeWPF.Commands;\r
+    using HandBrakeWPF.Commands.Interfaces;\r
+\r
     using ViewModels;\r
     using ViewModels.Interfaces;\r
 \r
@@ -59,6 +62,9 @@ namespace HandBrakeWPF.Startup
             this.windsorContainer.Register(Component.For<IEncodeServiceWrapper>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<INotificationService>().ImplementedBy<NotificationService>().LifeStyle.Is(LifestyleType.Singleton));\r
 \r
+            // Commands\r
+            this.windsorContainer.Register(Component.For<IAdvancedEncoderOptionsCommand>().ImplementedBy<AdvancedEncoderOptionsCommand>().LifeStyle.Is(LifestyleType.Singleton));\r
+\r
             // Shell\r
             this.windsorContainer.Register(Component.For<IErrorService>().ImplementedBy<ErrorService>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<IErrorViewModel>().ImplementedBy<ErrorViewModel>().LifeStyle.Is(LifestyleType.Singleton));\r
index fb35f0cdbf4e6ff52d97a1715f82495646374e61..01fcea409df865422594227aabc601af78aa461f 100644 (file)
@@ -211,6 +211,11 @@ namespace HandBrakeWPF
         /// </summary>\r
         public const string HandBrakePlatform = "HandBrakePlatform";\r
 \r
+        /// <summary>\r
+        /// The show advanced tab.\r
+        /// </summary>\r
+        public const string ShowAdvancedTab = "ShowAdvancedTab";\r
+\r
         #endregion\r
     }\r
 }
\ No newline at end of file
index 8e3c13e379ed2818c96e376d3628e3091ad1415b..29b4bed489a5e1e251b6149df157be03cd210f8e 100644 (file)
@@ -18,6 +18,7 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
+    using HandBrakeWPF.Commands.Interfaces;\r
     using HandBrakeWPF.Helpers;\r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
@@ -27,6 +28,11 @@ namespace HandBrakeWPF.ViewModels
     /// </summary>\r
     public class AdvancedViewModel : ViewModelBase, IAdvancedViewModel\r
     {\r
+        /// <summary>\r
+        /// The advanced encoder options command.\r
+        /// </summary>\r
+        private readonly IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand;\r
+\r
         #region Constants and Fields\r
 \r
         /// <summary>\r
@@ -166,8 +172,9 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Initializes a new instance of the <see cref="AdvancedViewModel"/> class.\r
         /// </summary>\r
-        public AdvancedViewModel()\r
+        public AdvancedViewModel(IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand)\r
         {\r
+            this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand;\r
             this.Task = new EncodeTask();\r
             this.UpdateUIFromAdvancedOptions();\r
         }\r
@@ -243,6 +250,12 @@ namespace HandBrakeWPF.ViewModels
                 this.Task.AdvancedEncoderOptions = value;\r
                 this.UpdateUIFromAdvancedOptions();\r
                 this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);\r
+\r
+                // Reset the video tab if the user is using this tab.\r
+                if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions))\r
+                {\r
+                    this.advancedEncoderOptionsCommand.ExecuteClearVideo();\r
+                }\r
             }\r
         }\r
 \r
@@ -630,14 +643,6 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Public Methods\r
 \r
-        /// <summary>\r
-        /// The notify all changed.\r
-        /// </summary>\r
-        public void NotifyAllChanged()\r
-        {\r
-            this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);\r
-        }\r
-\r
         /// <summary>\r
         /// The update ui from advanced options.\r
         /// </summary>\r
@@ -884,8 +889,6 @@ namespace HandBrakeWPF.ViewModels
                                     }\r
                                 }\r
 \r
-                                break;\r
-                            default:\r
                                 break;\r
                         }\r
                     }\r
@@ -933,6 +936,14 @@ namespace HandBrakeWPF.ViewModels
             }     \r
         }\r
 \r
+        /// <summary>\r
+        /// The clear.\r
+        /// </summary>\r
+        public void Clear()\r
+        {\r
+            this.AdvancedOptionsString = string.Empty;\r
+        }\r
+\r
         #endregion\r
 \r
         #region ITabInterface\r
@@ -1042,7 +1053,7 @@ namespace HandBrakeWPF.ViewModels
                     int equalsIndex = existingSegment.IndexOf('=');\r
                     if (equalsIndex >= 0)\r
                     {\r
-                        optionName = existingSegment.Substring(0, existingSegment.IndexOf("="));\r
+                        optionName = existingSegment.Substring(0, existingSegment.IndexOf("=", System.StringComparison.Ordinal));\r
                     }\r
 \r
                     if (!this.uiOptions.Contains(optionName) && optionName != string.Empty)\r
@@ -1154,6 +1165,12 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.Task.AdvancedEncoderOptions = string.Join(":", newOptions);\r
             this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);\r
+\r
+            // Reset the video tab if the user is using this tab.\r
+            if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions))\r
+            {\r
+                this.advancedEncoderOptionsCommand.ExecuteClearVideo();\r
+            }\r
         }\r
 \r
         #endregion\r
index 9114bea3239a1dddd9d8af3347b0f194d97b26ce..a84a79f6a501e27a8c92a7461d0ff1fa6790b976 100644 (file)
@@ -23,5 +23,10 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// The Video Encoder.\r
         /// </param>\r
         void SetEncoder(VideoEncoder encoder);\r
+\r
+        /// <summary>\r
+        /// Clear out the settings.\r
+        /// </summary>\r
+        void Clear();\r
     }\r
 }\r
index d3b1625015453823e4175a32ba8cf82329b9b9b4..d3602e5e5b6ed81f3ac0a0d3c7fdd50a1f110bab 100644 (file)
@@ -18,5 +18,10 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// Trigger a Notify Property Changed on the Task to force various UI elements to update.\r
         /// </summary>\r
         void RefreshTask();\r
+\r
+        /// <summary>\r
+        /// Clear the advanced x264 options.\r
+        /// </summary>\r
+        void ClearAdvancedSettings();\r
     }\r
 }\r
index 6577dfc5cc2fb002009a4571817716d8cc9907de..fee34fcb7aab1f8886c5bd016bf95d3b550adc83 100644 (file)
@@ -621,10 +621,6 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         public CancelScanCommand CancelScanCommand { get; set; }\r
 \r
-        #endregion\r
-\r
-        #region Properties for Settings\r
-\r
         /// <summary>\r
         /// Gets or sets Destination.\r
         /// </summary>\r
@@ -820,6 +816,17 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets a value indicating whether show advanced tab.\r
+        /// </summary>\r
+        public bool ShowAdvancedTab\r
+        {\r
+            get\r
+            {\r
+                return this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Load and Shutdown Handling\r
index 273a2f6d553ada311195e74950463d6b7832b2e6..82c0daa3c025165ec969fbeadbc495db1f5c5a61 100644 (file)
@@ -19,10 +19,7 @@ namespace HandBrakeWPF.ViewModels
     using System.Linq;\r
     using System.Windows;\r
 \r
-    using Caliburn.Micro;\r
-\r
     using HandBrake.ApplicationServices;\r
-    using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
@@ -354,6 +351,11 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         private bool enableLibHb;\r
 \r
+        /// <summary>\r
+        /// The show advanced tab backing field.\r
+        /// </summary>\r
+        private bool showAdvancedTab;\r
+\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -1373,6 +1375,22 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether enable lib hb.\r
+        /// </summary>\r
+        public bool ShowAdvancedTab\r
+        {\r
+            get\r
+            {\r
+                return this.showAdvancedTab;\r
+            }\r
+            set\r
+            {\r
+                this.showAdvancedTab = value;\r
+                this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #endregion\r
@@ -1638,6 +1656,7 @@ namespace HandBrakeWPF.ViewModels
             this.MinimiseToTray = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.MainWindowMinimize);\r
             this.DisablePresetUpdateCheckNotification = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PresetNotification);\r
             this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting<bool>(ASUserSettingConstants.ClearCompletedFromQueue);\r
+            this.ShowAdvancedTab = userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);\r
 \r
             // Set the preview count\r
             this.PreviewPicturesToScan.Clear();\r
@@ -1653,7 +1672,6 @@ namespace HandBrakeWPF.ViewModels
             this.ConstantQualityGranularity.Add("1.00");\r
             this.ConstantQualityGranularity.Add("0.50");\r
             this.ConstantQualityGranularity.Add("0.25");\r
-            this.ConstantQualityGranularity.Add("0.20");\r
             this.SelectedGranulairty = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step).ToString("0.00", CultureInfo.InvariantCulture);\r
 \r
             // Min Title Length\r
@@ -1873,6 +1891,7 @@ namespace HandBrakeWPF.ViewModels
             userSettingService.SetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);\r
             userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);\r
             userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));\r
+            userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);\r
 \r
             int value;\r
             if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))\r
index dba17ea7a4011d9002e3ab25feb7268b689c0b81..c4acd7fa862f287e5cf156cea22ebbb00c28f453 100644 (file)
@@ -11,7 +11,9 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.Generic;\r
+    using System.ComponentModel;\r
     using System.Globalization;\r
+    using System.Linq;\r
 \r
     using Caliburn.Micro;\r
 \r
@@ -20,8 +22,13 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Parsing;\r
     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
@@ -30,16 +37,25 @@ namespace HandBrakeWPF.ViewModels
     public class VideoViewModel : ViewModelBase, IVideoViewModel\r
     {\r
         #region Constants and Fields\r
-\r
         /// <summary>\r
         /// Same as source constant.\r
         /// </summary>\r
         private const string SameAsSource = "Same as source";\r
 \r
+        /// <summary>\r
+        /// The possible h264 levels.\r
+        /// </summary>\r
+        private static readonly List<string> Levels = new List<string> { "Auto", "1.0", "1b", "1.1", "1.2", "1.3", "2.0", "2.1", "2.2", "3.0", "3.1", "3.2", "4.0", "4.1", "4.2", "5.0", "5.1", "5.2"};\r
+\r
         /// <summary>\r
         /// Backing field for the user setting service.\r
         /// </summary>\r
-        private IUserSettingService userSettingService;\r
+        private readonly IUserSettingService userSettingService;\r
+\r
+        /// <summary>\r
+        /// The advanced encoder options command\r
+        /// </summary>\r
+        private readonly IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand;\r
 \r
         /// <summary>\r
         /// Backing field used to display / hide the x264 options\r
@@ -66,6 +82,21 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         private int rf;\r
 \r
+        /// <summary>\r
+        /// The x264 preset value.\r
+        /// </summary>\r
+        private int x264PresetValue;\r
+\r
+        /// <summary>\r
+        /// The extra arguments.\r
+        /// </summary>\r
+        private string extraArguments;\r
+\r
+        /// <summary>\r
+        /// The can clear tracker.\r
+        /// </summary>\r
+        private bool canClear;\r
+\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -73,24 +104,26 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Initializes a new instance of the <see cref="VideoViewModel"/> class.\r
         /// </summary>\r
-        /// <param name="windowManager">\r
-        /// The window manager.\r
-        /// </param>\r
         /// <param name="userSettingService">\r
         /// The user Setting Service.\r
         /// </param>\r
-        public VideoViewModel(IWindowManager windowManager, IUserSettingService userSettingService)\r
+        /// <param name="advancedEncoderOptionsCommand">\r
+        /// The advanced Encoder Options Command.\r
+        /// </param>\r
+        public VideoViewModel(IUserSettingService userSettingService, IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand)\r
         {\r
             this.Task = new EncodeTask { VideoEncoder = VideoEncoder.X264 };\r
             this.userSettingService = userSettingService;\r
+            this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand;\r
             this.QualityMin = 0;\r
             this.QualityMax = 51;\r
             this.IsConstantQuantity = true;\r
             this.VideoEncoders = EnumHelper<VideoEncoder>.GetEnumList();\r
 \r
-            //X264Presets = EnumHelper<x264Preset>.GetEnumList();\r
-            //X264Profiles = EnumHelper<x264Profile>.GetEnumList();\r
-            //X264Tunes = EnumHelper<x264Tune>.GetEnumList();\r
+            X264Presets = new BindingList<x264Preset>(EnumHelper<x264Preset>.GetEnumList().ToList());\r
+            H264Profiles = EnumHelper<x264Profile>.GetEnumList();\r
+            X264Tunes = EnumHelper<x264Tune>.GetEnumList().Where(t => t != x264Tune.Fastdecode);\r
+            this.H264Levels = Levels;\r
         }\r
 \r
         #endregion\r
@@ -259,7 +292,7 @@ namespace HandBrakeWPF.ViewModels
                 this.rf = value;\r
 \r
                 double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);\r
-                this.SetQualitySliderBounds(); \r
+                this.SetQualitySliderBounds();\r
                 switch (this.SelectedVideoEncoder)\r
                 {\r
                     case VideoEncoder.FFMpeg:\r
@@ -379,6 +412,193 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         public IEnumerable<VideoEncoder> VideoEncoders { get; set; }\r
 \r
+        /// <summary>\r
+        /// Gets or sets the extra arguments.\r
+        /// </summary>\r
+        public string ExtraArguments\r
+        {\r
+            get\r
+            {\r
+                return this.extraArguments;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.extraArguments, value))\r
+                {\r
+                    this.extraArguments = value;\r
+                    this.NotifyOfPropertyChange(() => this.ExtraArguments);\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether display x 264 options.\r
+        /// </summary>\r
+        public bool DisplayX264Options\r
+        {\r
+            get\r
+            {\r
+                return this.displayX264Options;\r
+            }\r
+            set\r
+            {\r
+                this.displayX264Options = value;\r
+                this.NotifyOfPropertyChange(() => this.DisplayX264Options);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the x 264 preset value.\r
+        /// </summary>\r
+        public int X264PresetValue\r
+        {\r
+            get\r
+            {\r
+                return this.x264PresetValue;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.X264PresetValue, value))\r
+                {\r
+                    this.x264PresetValue = value;\r
+                    this.X264Preset = this.X264Presets[value];\r
+                    this.NotifyOfPropertyChange(() => this.x264PresetValue);\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets X264Preset.\r
+        /// </summary>\r
+        public x264Preset X264Preset\r
+        {\r
+            get\r
+            {\r
+                return this.Task.X264Preset;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.X264Preset, value))\r
+                {\r
+                    this.Task.X264Preset = value;\r
+                    this.NotifyOfPropertyChange(() => this.X264Preset);\r
+                    ResetAdvancedTab();\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets H264Profile.\r
+        /// </summary>\r
+        public x264Profile H264Profile\r
+        {\r
+            get\r
+            {\r
+                return this.Task.H264Profile;\r
+            }\r
+\r
+            set\r
+            {\r
+                if (!object.Equals(this.H264Profile, value))\r
+                {\r
+                    this.Task.H264Profile = value;\r
+                    this.NotifyOfPropertyChange(() => this.H264Profile);\r
+                    ResetAdvancedTab();\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets H264Profile.\r
+        /// </summary>\r
+        public string H264Level\r
+        {\r
+            get\r
+            {\r
+                return this.Task.H264Level;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.H264Level, value))\r
+                {\r
+                    this.Task.H264Level = value;\r
+                    this.NotifyOfPropertyChange(() => this.H264Level);\r
+                    ResetAdvancedTab();\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets X264Tune.\r
+        /// </summary>\r
+        public x264Tune X264Tune\r
+        {\r
+            get\r
+            {\r
+                return this.Task.X264Tune;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.X264Tune, value))\r
+                {\r
+                    this.Task.X264Tune = value;\r
+                    this.NotifyOfPropertyChange(() => this.X264Tune);\r
+                    ResetAdvancedTab();\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether fast decode.\r
+        /// </summary>\r
+        public bool FastDecode\r
+        {\r
+            get\r
+            {\r
+                return this.Task.FastDecode;\r
+            }\r
+            set\r
+            {\r
+                if (!object.Equals(this.FastDecode, value))\r
+                {\r
+                    this.Task.FastDecode = value;\r
+                    this.NotifyOfPropertyChange(() => this.FastDecode);\r
+                    ResetAdvancedTab();\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets X264Presets.\r
+        /// </summary>\r
+        public BindingList<x264Preset> X264Presets { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets X264Profiles.\r
+        /// </summary>\r
+        public IEnumerable<x264Profile> H264Profiles { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets X264Tunes.\r
+        /// </summary>\r
+        public IEnumerable<x264Tune> X264Tunes { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the x 264 levels.\r
+        /// </summary>\r
+        public IEnumerable<string> H264Levels { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets the full options tooltip.\r
+        /// </summary>\r
+        public string FullOptionsTooltip\r
+        {\r
+            get\r
+            {\r
+                return "You can provide additional arguments using the standard x264 format"; // string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query());\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Public Methods\r
@@ -444,15 +664,15 @@ namespace HandBrakeWPF.ViewModels
             {\r
                 case VideoEncoder.FFMpeg:\r
                 case VideoEncoder.FFMpeg2:\r
-                    int cq;\r
                     if (preset.Task.Quality.HasValue)\r
                     {\r
+                        int cq;\r
                         int.TryParse(preset.Task.Quality.Value.ToString(CultureInfo.InvariantCulture), out cq);\r
                         this.RF = 32 - cq;\r
                     }\r
                     break;\r
                 case VideoEncoder.X264:\r
\r
+\r
                     double multiplier = 1.0 / cqStep;\r
                     if (preset.Task.Quality.HasValue)\r
                     {\r
@@ -477,15 +697,16 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.NotifyOfPropertyChange(() => this.Task);\r
 \r
-            //if (preset != null && preset.Task != null)\r
-            //{\r
-            //    this.Query = preset.Task.AdvancedEncoderOptions;\r
-            //    this.SetEncoder(preset.Task.VideoEncoder);\r
-\r
-            //    this.X264Preset = preset.Task.x264Preset;\r
-            //    this.X264Profile = preset.Task.x264Profile;\r
-            //    this.X264Tune = preset.Task.X264Tune;\r
-            //}\r
+            if (preset.Task != null)\r
+            {\r
+                this.SetEncoder(preset.Task.VideoEncoder);\r
+                this.X264PresetValue = preset.Task.VideoEncoder == VideoEncoder.X264\r
+                                           ? (int)preset.Task.X264Preset\r
+                                           : (int)x264Preset.Medium;\r
+                this.H264Profile = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Profile : x264Profile.None;\r
+                this.X264Tune = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.X264Tune : x264Tune.None;\r
+                this.H264Level = preset.Task.H264Level;\r
+            }\r
         }\r
 \r
         /// <summary>\r
@@ -518,7 +739,7 @@ namespace HandBrakeWPF.ViewModels
         /// </param>\r
         public void SetEncoder(VideoEncoder encoder)\r
         {\r
-            //this.DisplayX264Options = encoder == VideoEncoder.X264;\r
+            this.DisplayX264Options = encoder == VideoEncoder.X264;\r
         }\r
 \r
         /// <summary>\r
@@ -534,6 +755,21 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Clear advanced settings.\r
+        /// </summary>\r
+        public void ClearAdvancedSettings()\r
+        {\r
+            this.canClear = false;\r
+            this.X264PresetValue = 5;\r
+            this.X264Tune = x264Tune.None;\r
+            this.H264Profile = x264Profile.None;\r
+            this.FastDecode = false;\r
+            this.H264Level = "Auto";\r
+            this.ExtraArguments = string.Empty;\r
+            this.canClear = true;\r
+        }\r
+\r
         #endregion\r
 \r
         /// <summary>\r
@@ -561,101 +797,44 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        #region Advanced\r
-        ///// <summary>\r
-        ///// Gets or sets State.\r
-        ///// </summary>\r
-        //public string Query\r
-        //{\r
-        //    get\r
-        //    {\r
-        //        return this.Task.AdvancedEncoderOptions;\r
-        //    }\r
-        //    set\r
-        //    {\r
-        //        this.Task.AdvancedEncoderOptions = value;\r
-        //        this.NotifyOfPropertyChange(() => this.Query);\r
-        //    }\r
-        //}\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Preset.\r
-        ///// </summary>\r
-        //public x264Preset X264Preset\r
-        //{\r
-        //    get\r
-        //    {\r
-        //        return this.Task.x264Preset;\r
-        //    }\r
-        //    set\r
-        //    {\r
-        //        this.Task.x264Preset = value;\r
-        //        this.NotifyOfPropertyChange(() => this.X264Preset);\r
-        //    }\r
-        //}\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Profile.\r
-        ///// </summary>\r
-        //public x264Profile X264Profile\r
-        //{\r
-        //    get\r
-        //    {\r
-        //        return this.Task.x264Profile;\r
-        //    }\r
-        //    set\r
-        //    {\r
-        //        this.Task.x264Profile = value;\r
-        //        this.NotifyOfPropertyChange(() => this.X264Profile);\r
-        //    }\r
-        //}\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Tune.\r
-        ///// </summary>\r
-        //public x264Tune X264Tune\r
-        //{\r
-        //    get\r
-        //    {\r
-        //        return this.Task.X264Tune;\r
-        //    }\r
-        //    set\r
-        //    {\r
-        //        this.Task.X264Tune = value;\r
-        //        this.NotifyOfPropertyChange(() => this.X264Tune);\r
-        //    }\r
-        //}\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Presets.\r
-        ///// </summary>\r
-        //public IEnumerable<x264Preset> X264Presets { get; set; }\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Profiles.\r
-        ///// </summary>\r
-        //public IEnumerable<x264Profile> X264Profiles { get; set; }\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets X264Tunes.\r
-        ///// </summary>\r
-        //public IEnumerable<x264Tune> X264Tunes { get; set; }\r
-\r
-        ///// <summary>\r
-        ///// Gets or sets a value indicating whether DisplayX264Options.\r
-        ///// </summary>\r
-        //public bool DisplayX264Options\r
-        //{\r
-        //    get\r
-        //    {\r
-        //        return this.displayX264Options;\r
-        //    }\r
-        //    set\r
-        //    {\r
-        //        this.displayX264Options = value;\r
-        //        this.NotifyOfPropertyChange(() => this.DisplayX264Options);\r
-        //    }\r
-        //}\r
-        #endregion\r
+        /// <summary>\r
+        /// Reset advanced tab.\r
+        /// </summary>\r
+        private void ResetAdvancedTab()\r
+        {\r
+            if (canClear)\r
+            {\r
+                this.advancedEncoderOptionsCommand.ExecuteClearAdvanced();\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// The get actualx 264 query.\r
+        /// </summary>\r
+        /// <returns>\r
+        /// The <see cref="string"/>.\r
+        /// </returns>\r
+        private string GetActualx264Query()\r
+        {\r
+            string preset = EnumHelper<x264Preset>.GetDisplay(this.X264Preset);\r
+            string profile = EnumHelper<x264Profile>.GetDisplay(this.H264Profile);\r
+\r
+            List<string> tunes = new List<string>();\r
+            if (X264Tune != x264Tune.None)\r
+            {\r
+                tunes.Add(EnumHelper<x264Tune>.GetDisplay(this.X264Tune));\r
+            }\r
+            if (this.FastDecode)\r
+            {\r
+                tunes.Add("fastdecode");\r
+            }\r
+\r
+            // Get the width or height, default if we don't have it yet so we don't crash.\r
+            int width = this.Task.Width.HasValue ? this.Task.Width.Value : 720;\r
+            int height = this.Task.Height.HasValue ? this.Task.Height.Value : 576;\r
+\r
+            // TODO figure out what is wrong with this??\r
+            return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height);\r
+        }\r
     }\r
 }
\ No newline at end of file
index 5bed28974081f2723ce4022fae1922dbc207de2f..76dbf78726b93233f76f4e0db97bbadef034a5f8 100644 (file)
                 <TabItem Name="pictureTab" Header="Picture">\r
                     <ContentControl x:Name="PictureSettingsViewModel" />\r
                 </TabItem>\r
-                <TabItem Name="filtersTab" Header="Video Filters">\r
+                <TabItem Name="filtersTab" Header="Filters">\r
                     <ContentControl x:Name="FiltersViewModel" />\r
                 </TabItem>\r
                 <TabItem Name="videoTab" Header="Video">\r
                 <TabItem Name="chaptersTab" Header="Chapters">\r
                     <ContentControl x:Name="ChaptersViewModel" />\r
                 </TabItem>\r
-                <TabItem Name="advancedTab" Header="Advanced">\r
+                <TabItem Name="advancedTab" Header="Advanced" Visibility="{Binding ShowAdvancedTab, Converter={StaticResource boolToVisConverter}}">\r
                     <ContentControl x:Name="AdvancedViewModel" />\r
                 </TabItem>\r
             </TabControl>\r
index 2f3213a7fa5a63811b7e6b9d9bbe558746ebc194..c5d5d3e6095bd9a62dcf0dbd7e358e03089cc38b 100644 (file)
                             <CheckBox Content="Display status messages from tray icon (balloon popups)"  Visibility="Collapsed"  IsChecked="{Binding DisplayStatusMessagesTrayIcon}" />\r
                             <CheckBox Content="Disable built-in preset update notification" IsChecked="{Binding DisablePresetUpdateCheckNotification}" />\r
                             <CheckBox Content="Always clear completed queue items after an encode completes" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />\r
+                            <CheckBox Content="Show Advanced Tab" IsChecked="{Binding ShowAdvancedTab}" />\r
                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0">\r
                                 <TextBlock Text="Number of picture previews to scan:" VerticalAlignment="Center" Width="250" />\r
                                 <ComboBox Name="numberOfPreviews" ItemsSource="{Binding PreviewPicturesToScan}" SelectedItem="{Binding SelectedPreviewCount}" Width="120" />\r
index 27f2a2f30c384e2c4119cf057bc84ad5967141e8..ffc02778676fbf0a1ba5f11f3b60a08c5948840a 100644 (file)
@@ -4,13 +4,18 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" \r
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"\r
              xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"\r
-             xmlns:Video="clr-namespace:HandBrakeWPF.Converters.Video" mc:Ignorable="d" >\r
+             xmlns:Video="clr-namespace:HandBrakeWPF.Converters.Video"\r
+             xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" mc:Ignorable="d" >\r
 \r
     <UserControl.Resources>\r
         <Converters:BooleanConverter x:Key="boolConverter" />\r
         <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />\r
         <Converters:EnumComboConverter x:Key="enumComboConverter" />\r
         <Video:VideoEncoderConverter x:Key="videoEncoderConverter" />\r
+\r
+        <Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">\r
+            <Setter Property="ToolTipService.ShowDuration" Value="20000" />\r
+        </Style>\r
     </UserControl.Resources>\r
    \r
     <Grid Margin="10,5,0,0">\r
                 <ColumnDefinition Width="*" />\r
                 <ColumnDefinition Width="*" />\r
             </Grid.ColumnDefinitions>\r
+            \r
+            <Grid.RowDefinitions>\r
+                <RowDefinition Height="Auto" />\r
+                <RowDefinition Height="Auto" />\r
+            </Grid.RowDefinitions>\r
 \r
             <StackPanel Orientation="Vertical" Grid.Column="0" >\r
 \r
                     <StackPanel Orientation="Vertical">\r
                         <ComboBox Width="120" ItemsSource="{Binding Framerates}" SelectedItem="{Binding SelectedFramerate}" />\r
                         <RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" Margin="0,10,0,0" />\r
-                        <RadioButton Content="Variable Framerate" IsChecked="{Binding IsVariableFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />\r
-                        <RadioButton Content="Peak Framerate" IsChecked="{Binding IsPeakFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />\r
+                        <RadioButton Content="Variable Framerate" IsChecked="{Binding IsVariableFramerate}" Margin="0,5,0,0" \r
+                                     Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />\r
+                        <RadioButton Content="Peak Framerate" IsChecked="{Binding IsPeakFramerate}" Margin="0,5,0,0"\r
+                                     Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />\r
                     </StackPanel>\r
                 </StackPanel>\r
             </StackPanel>\r
                     <TextBlock Text="RF" FontWeight="Bold" />\r
                 </StackPanel>\r
 \r
-                <Slider Width="240" Value="{Binding RF}"  Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"\r
-                        IsEnabled="{Binding IsConstantQuantity}" Margin="0,0,0,20" />\r
+                <Slider Width="280" Value="{Binding RF}" HorizontalAlignment="Left"  Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"\r
+                        IsEnabled="{Binding IsConstantQuantity}" Margin="20,0,0,20"\r
+                        ToolTip="{x:Static Properties:Resources.Video_QualitySlider}" Style="{StaticResource LongToolTipHolder}" \r
+                        IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" />\r
 \r
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,10">\r
                     <RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0"/>\r
 \r
             </StackPanel>\r
 \r
-\r
-            <!--<Grid Grid.Row="1" Margin="10,10,0,0" Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">\r
+            <!-- H264 settings -->\r
+            <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0,20,0,0" Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">\r
                 <Grid.RowDefinitions>\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="Auto" />\r
                     <RowDefinition Height="Auto" />\r
                     <RowDefinition Height="*" />\r
                 </Grid.RowDefinitions>\r
-\r
-                <StackPanel Grid.Row="0" Orientation="Vertical" Margin="0,0,0,10">\r
-\r
-                    <TextBlock Text="X264 Advanced Options:" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />\r
-\r
-                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">\r
-                        <TextBlock Text="Preset:" VerticalAlignment="Center" />\r
-                        <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"\r
-                          ItemsSource="{Binding X264Presets, Converter={StaticResource x264DisplayConverter}}" \r
-                          SelectedItem="{Binding X264Preset, Converter={StaticResource x264DisplayConverter}}"/>\r
-\r
-                        <TextBlock Text="Profile:" VerticalAlignment="Center" />\r
-                        <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"\r
-                          ItemsSource="{Binding X264Profiles, Converter={StaticResource x264DisplayConverter}}" \r
-                          SelectedItem="{Binding X264Profile, Converter={StaticResource x264DisplayConverter}}"/>\r
-\r
-\r
-                        <TextBlock Text="Tune:" VerticalAlignment="Center" />\r
-                        <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"\r
-                          ItemsSource="{Binding X264Tunes, Converter={StaticResource x264DisplayConverter}}" \r
-                          SelectedItem="{Binding X264Tune, Converter={StaticResource x264DisplayConverter}}"/>\r
-                    </StackPanel>\r
+                \r
+                <Grid.ColumnDefinitions>\r
+                    <ColumnDefinition Width="Auto" />\r
+                    <ColumnDefinition Width="Auto" />\r
+                    <ColumnDefinition Width="Auto" />\r
+                    <ColumnDefinition Width="Auto" />\r
+                </Grid.ColumnDefinitions>\r
+\r
+                <TextBlock Text="Optimise Video:" Margin="0,0,0,8" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontWeight="Bold" VerticalAlignment="Center" />\r
+\r
+                <!-- Row 1 -->\r
+                <TextBlock Text="x264 Preset:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />\r
+                <StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal">\r
+                    <Slider Minimum="0" Maximum="9" Width="150" Value="{Binding X264PresetValue, Mode=Default, UpdateSourceTrigger=PropertyChanged}" \r
+                            IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" ToolTip="{x:Static Properties:Resources.Video_x264Preset}" \r
+                            Style="{StaticResource LongToolTipHolder}" />\r
+                    <TextBlock Text="{Binding X264Preset, Converter={StaticResource enumComboConverter}}" Margin="5,0,0,0" />\r
                 </StackPanel>\r
 \r
+                <TextBlock Text="x264 Tune:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,10,0,0"  />\r
+                <ComboBox Width="100" Grid.Row="2" Grid.Column="1" Margin="5,10,5,0" Height="22"\r
+                          ItemsSource="{Binding X264Tunes, Converter={StaticResource enumComboConverter}}" \r
+                          SelectedItem="{Binding X264Tune, Converter={StaticResource enumComboConverter}}"\r
+                          ToolTip="{x:Static Properties:Resources.Video_x264Tune}"\r
+                          Style="{StaticResource LongToolTipHolder}" />\r
+                <CheckBox IsChecked="{Binding FastDecode}" Content="Fast Decode" Grid.Row="2" Grid.Column="2" Margin="10,10,10,0" VerticalAlignment="Center"\r
+                          ToolTip="{x:Static Properties:Resources.Video_x264FastDecode}"/>\r
+                \r
+\r
+                <!-- Row 2-->\r
+                <TextBlock Text="H.264 Profile:" Grid.Row="3" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" />\r
+                <ComboBox Width="100" Grid.Row="3" Grid.Column="1" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"\r
+                          ItemsSource="{Binding H264Profiles, Converter={StaticResource enumComboConverter}}" \r
+                          SelectedItem="{Binding H264Profile, Converter={StaticResource enumComboConverter}}"\r
+                          Style="{StaticResource LongToolTipHolder}"\r
+                          ToolTip="{x:Static Properties:Resources.Video_x264Profile}" />\r
+\r
+                <TextBlock Text="H.264 Level:" Grid.Row="3" Grid.Column="2" Margin="10,10,0,0" VerticalAlignment="Center" />\r
+                <ComboBox Width="100" Grid.Row="3" Grid.Column="3" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"\r
+                          ItemsSource="{Binding H264Levels}" \r
+                          SelectedItem="{Binding H264Level}"\r
+                          Style="{StaticResource LongToolTipHolder}"\r
+                          ToolTip="{x:Static Properties:Resources.Video_x264Level}"/>\r
+                \r
+                <!-- Row 3 -->\r
+                <TextBlock Text="Extra Options:" Grid.Row="4" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />\r
+                <TextBox Text="{Binding ExtraArguments}" Height="30" MaxLines="2" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Margin="5,10,0,0" VerticalAlignment="Center"\r
+                         ToolTip="{Binding FullOptionsTooltip}"/>\r
+                \r
+                \r
             </Grid>\r
-\r
-            <StackPanel Grid.Row="2" Margin="10" Height="100" VerticalAlignment="Top" >\r
-                <TextBlock Text="Advanced Query" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />\r
-                <TextBox Text="{Binding Query}" \r
-                 VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="150" TextWrapping="Wrap" />\r
-            </StackPanel>-->\r
-\r
-\r
-\r
         </Grid>\r
 \r
     </Grid>\r
index 80a1e6e2c8f4813af152c93ac8c06c5cf5966d6e..73d5742fc684f6e5dc4d13681ab2a7a48ee4fb96 100644 (file)
@@ -5,7 +5,7 @@
       <string>X264Step</string>\r
     </key>\r
     <value>\r
-      <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:double" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0.25</anyType>\r
+      <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:double" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">1.0</anyType>\r
     </value>\r
   </item>\r
   <item>\r
       <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>\r
     </value>\r
   </item>\r
+  <item>\r
+    <key>\r
+      <string>ShowAdvancedTab</string>\r
+    </key>\r
+    <value>\r
+      <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>\r
+    </value>\r
+  </item>\r
 </dictionary>
\ No newline at end of file