From 93235d2c7d15e031015ebbbfeefa14778fe9a56e Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 28 Dec 2012 11:21:14 +0000 Subject: WinGui: Initial work to implement x264 Preset/Tune/Profile/Level options in-gui. 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 --- .../Model/EncodeTask.cs | 24 +- .../Services/Encode.cs | 3 +- .../Utilities/Converters.cs | 2 - .../Utilities/QueryGeneratorUtility.cs | 33 +- .../Utilities/QueryParserUtility.cs | 46 ++- .../Model/Encoding/x264/x264Preset.cs | 3 - .../Model/Encoding/x264/x264Profile.cs | 2 +- .../Model/Encoding/x264/x264Tune.cs | 3 - .../Commands/AdvancedEncoderOptionsCommand.cs | 40 ++ .../Interfaces/IAdvancedEncoderOptionsCommand.cs | 27 ++ win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 3 + .../HandBrakeWPF/Properties/Resources.Designer.cs | 82 +++- win/CS/HandBrakeWPF/Properties/Resources.resx | 40 ++ win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs | 6 + win/CS/HandBrakeWPF/UserSettingConstants.cs | 5 + .../HandBrakeWPF/ViewModels/AdvancedViewModel.cs | 41 +- .../ViewModels/Interfaces/IAdvancedViewModel.cs | 5 + .../ViewModels/Interfaces/IVideoViewModel.cs | 5 + win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 15 +- win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 27 +- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 415 +++++++++++++++------ win/CS/HandBrakeWPF/Views/MainView.xaml | 4 +- win/CS/HandBrakeWPF/Views/OptionsView.xaml | 1 + win/CS/HandBrakeWPF/Views/VideoView.xaml | 111 ++++-- win/CS/HandBrakeWPF/defaultsettings.xml | 10 +- 25 files changed, 732 insertions(+), 221 deletions(-) create mode 100644 win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs create mode 100644 win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs (limited to 'win') diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index e7869459b..9f5c043a0 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -34,8 +34,8 @@ namespace HandBrake.ApplicationServices.Model this.SubtitleTracks = new ObservableCollection(); this.ChapterNames = new ObservableCollection(); this.AllowedPassthruOptions = new AllowedPassthru(); - this.x264Preset = x264Preset.None; - this.x264Profile = x264Profile.None; + this.X264Preset = x264Preset.Medium; + this.H264Profile = x264Profile.None; this.X264Tune = x264Tune.None; this.Modulus = 16; } @@ -60,7 +60,6 @@ namespace HandBrake.ApplicationServices.Model this.AudioTracks.Add(new AudioTrack(track)); } - this.ChapterNames = new ObservableCollection(); foreach (ChapterMarker track in task.ChapterNames) { @@ -115,9 +114,10 @@ namespace HandBrake.ApplicationServices.Model this.VideoEncoder = task.VideoEncoder; this.VideoEncodeRateType = task.VideoEncodeRateType; this.Width = task.Width; - this.x264Preset = task.x264Preset; - this.x264Profile = task.x264Profile; + this.X264Preset = task.X264Preset; + this.H264Profile = task.H264Profile; this.X264Tune = task.X264Tune; + this.FastDecode = task.FastDecode; this.PreviewStartAt = task.PreviewStartAt; this.PreviewDuration = task.PreviewDuration; @@ -399,18 +399,28 @@ namespace HandBrake.ApplicationServices.Model /// /// Gets or sets x264Preset. /// - public x264Preset x264Preset { get; set; } + public x264Preset X264Preset { get; set; } /// /// Gets or sets x264Profile. /// - public x264Profile x264Profile { get; set; } + public x264Profile H264Profile { get; set; } + + /// + /// Gets or sets the x 264 level. + /// + public string H264Level { get; set; } /// /// Gets or sets X264Tune. /// public x264Tune X264Tune { get; set; } + /// + /// Gets or sets a value indicating whether fast decode. + /// + public bool FastDecode { get; set; } + #endregion #region Preview diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 0c35c8f41..ce75267c5 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -67,8 +67,7 @@ namespace HandBrake.ApplicationServices.Services : base(userSettingService) { this.userSettingService = userSettingService; - this.EncodeStarted += this.EncodeEncodeStarted; - + this.EncodeStarted += this.EncodeEncodeStarted; } #region Properties diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs index 0638a8e28..46e696ca1 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs @@ -470,8 +470,6 @@ namespace HandBrake.ApplicationServices.Utilities return x264Tune.Ssim; case "fastdecode": return x264Tune.Fastdecode; - case "zerolatency": - return x264Tune.Zerolatency; default: return x264Tune.Film; } diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index a6dc97758..b6fc06faf 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -45,6 +45,11 @@ namespace HandBrake.ApplicationServices.Utilities /// public static string GenerateQuery(EncodeTask task, int previewScanCount, int verbosity, bool disableLibDvdNav) { + if (string.IsNullOrEmpty(task.Source)) + { + return "No source selected"; + } + string query = string.Empty; query += SourceQuery(task, null, null, previewScanCount); query += DestinationQuery(task); @@ -898,19 +903,37 @@ namespace HandBrake.ApplicationServices.Utilities { string query = string.Empty; - if (task.x264Preset != x264Preset.None) + if (task.X264Preset != x264Preset.Medium) { - query += string.Format("--x264-preset={0} ", task.x264Preset.ToString().ToLower().Replace(" ", string.Empty)); + query += string.Format(" --x264-preset={0} ", task.X264Preset.ToString().ToLower().Replace(" ", string.Empty)); } - if (task.x264Profile != x264Profile.None) + if (task.H264Profile != x264Profile.None) { - query += string.Format("--x264-profile={0} ", task.x264Profile.ToString().ToLower().Replace(" ", string.Empty)); + query += string.Format(" --x264-profile={0} ", task.H264Profile.ToString().ToLower().Replace(" ", string.Empty)); } if (task.X264Tune != x264Tune.None) { - query += string.Format("--x264-tune={0} ", task.X264Tune.ToString().ToLower().Replace(" ", string.Empty)); + string tune = string.Empty; + + if (task.FastDecode) + { + tune = "fastdecode"; + } + + string tuneDropdown = task.X264Tune.ToString().ToLower().Replace(" ", string.Empty); + if (task.X264Tune != x264Tune.None && !string.IsNullOrEmpty(tuneDropdown)) + { + tune = string.IsNullOrEmpty(tune) ? tuneDropdown : string.Format(",{0}", tuneDropdown); + } + + query += string.Format(" --x264-tune=\"{0}\" ", tune); + } + + if (task.H264Level != "Auto") + { + query += string.Format(" --h264-level=\"{0}\" ", task.H264Level); } if (!string.IsNullOrEmpty(task.AdvancedEncoderOptions)) diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index f0b5d65e3..eae37e2b5 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -91,12 +91,9 @@ namespace HandBrake.ApplicationServices.Utilities Match turboFirstPass = Regex.Match(input, @" -T"); Match optimizeMP4 = Regex.Match(input, @" -O"); Match pfr = Regex.Match(input, @" --pfr"); - Match vfr = Regex.Match(input, @" --vfr"); Match cfr = Regex.Match(input, @" --cfr"); // Audio Settings Tab - Match noAudio = Regex.Match(input, @"-a none"); - Match audioTracks = Regex.Match(input, @"-a ([0-9,]+)"); Match audioTrackMixes = Regex.Match(input, @"-6 ([0-9a-zA-Z,]+)"); Match audioEncoders = Regex.Match(input, @"-E ([a-zA-Z0-9+,:\*]+)"); Match audioBitrates = Regex.Match(input, @"-B ([0-9a-zA-Z,]+)"); // Auto = a-z @@ -112,9 +109,11 @@ namespace HandBrake.ApplicationServices.Utilities // Advanced Tab Match advanced = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)"); - Match x264Preset = Regex.Match(input, @"--x264-preset([=a-zA-Z0-9\s]*)"); - Match x264Tune = Regex.Match(input, @"--x264-tune([=a-zA-Z0-9\s]*)"); - Match x264Profile = Regex.Match(input, @"--x264-profile([=a-zA-Z0-9\s]*)"); + Match x264Preset = Regex.Match(input, @"--x264-preset([=a-zA-Z0-9\s ]*)"); + Match x264Tune = Regex.Match(input, @"--x264-tune([=,a-zA-Z0-9\s ]*)"); + Match h264Profile = Regex.Match(input, @"--h264-profile([=a-zA-Z0-9\s ]*)"); + Match x264Profile = Regex.Match(input, @"--x264-profile([=a-zA-Z0-9\s ]*)"); + Match h264Level = Regex.Match(input, @"--h264-level([=a-zA-Z0-9.\s ]*)"); #endregion @@ -243,7 +242,6 @@ namespace HandBrake.ApplicationServices.Utilities parsed.CustomDecomb = value; parsed.Decomb = parsed.CustomDecomb == "7:2:6:9:1:80" ? Decomb.Fast : Decomb.Custom; } - } } @@ -364,7 +362,6 @@ namespace HandBrake.ApplicationServices.Utilities } // Get the data from the regular expression results - string[] trackData = null; string[] trackMixes = null; string[] trackEncoders = null; string[] trackBitrates = null; @@ -372,8 +369,6 @@ namespace HandBrake.ApplicationServices.Utilities string[] trackDRCvalues = null; string[] trackGainValues = null; - if (audioTracks.Success) - trackData = audioTracks.ToString().Replace("-a ", string.Empty).Split(','); if (audioTrackMixes.Success) trackMixes = audioTrackMixes.ToString().Replace("-6 ", string.Empty).Split(','); if (audioEncoders.Success) @@ -392,9 +387,6 @@ namespace HandBrake.ApplicationServices.Utilities for (int x = 0; x < encoderCount; x++) { AudioTrack track = new AudioTrack(); - //if (trackData != null) - // if (trackData.Length >= (x + 1)) // Audio Track - // track.ScannedTrack = trackData[x].Trim(); if (trackMixes != null) if (trackMixes.Length >= (x + 1)) // Audio Mix @@ -457,17 +449,35 @@ namespace HandBrake.ApplicationServices.Utilities parsed.AdvancedEncoderOptions = advanced.ToString().Replace("-x ", string.Empty); if (x264Preset.Success) - parsed.x264Preset = + parsed.X264Preset = Converters.Getx264PresetFromCli(x264Preset.ToString().Replace("--x264-preset", string.Empty).Replace("=", string.Empty).Trim()); + if (h264Profile.Success) + parsed.H264Profile = + Converters.Getx264ProfileFromCli(h264Profile.ToString().Replace("--h264-profile", string.Empty).Replace("=", string.Empty).Trim()); + if (x264Profile.Success) - parsed.x264Profile = - Converters.Getx264ProfileFromCli(x264Profile.ToString().Replace("--x264-profile", string.Empty).Replace("=", string.Empty).Trim()); + parsed.H264Profile = + Converters.Getx264ProfileFromCli(x264Profile.ToString().Replace("--x264-profile", string.Empty).Replace("=", string.Empty).Trim()); + + if (h264Level.Success) + parsed.H264Level = + h264Level.ToString().Replace("--h264-level", string.Empty).Replace("=", string.Empty).Trim(); if (x264Tune.Success) - parsed.X264Tune = - Converters.Getx264TuneFromCli(x264Tune.ToString().Replace("--x264-tune", string.Empty).Replace("=", string.Empty).Trim()); + { + string tuneOptions = + x264Tune.ToString().Replace("--x264-tune", string.Empty).Replace("=", string.Empty).Trim(); + parsed.FastDecode = tuneOptions.Contains("fastdecode"); + + // Remove these options. They are not in the dropdown. + tuneOptions = tuneOptions.Replace("fastdecode", string.Empty).Replace( + ",", string.Empty); + + parsed.X264Tune = Converters.Getx264TuneFromCli(tuneOptions); + } + #endregion } catch (Exception exc) diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Preset.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Preset.cs index d0bb915a4..f68c293e5 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Preset.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Preset.cs @@ -16,9 +16,6 @@ namespace HandBrake.Interop.Model.Encoding.x264 /// public enum x264Preset { - [Display(Name = "None")] - None = 0, - [Display(Name = "Ultrafast")] Ultrafast, diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs index 9cbce6161..e82d772d6 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs @@ -16,7 +16,7 @@ namespace HandBrake.Interop.Model.Encoding.x264 /// public enum x264Profile { - [Display(Name = "None")] + [Display(Name = "Auto")] None = 0, [Display(Name = "Baseline")] diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Tune.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Tune.cs index 60421cc02..1ae23c437 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Tune.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Tune.cs @@ -39,8 +39,5 @@ namespace HandBrake.Interop.Model.Encoding.x264 [Display(Name = "Fast Decode")] Fastdecode, - - [Display(Name = "Zero Latency")] - Zerolatency, } } diff --git a/win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs b/win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs new file mode 100644 index 000000000..bb78e1c3c --- /dev/null +++ b/win/CS/HandBrakeWPF/Commands/AdvancedEncoderOptionsCommand.cs @@ -0,0 +1,40 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Command for resetting the video / advnaced tabs encoder options. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Commands +{ + using Caliburn.Micro; + + using HandBrakeWPF.Commands.Interfaces; + using HandBrakeWPF.ViewModels.Interfaces; + + /// + /// A Command for resetting the video / advnaced tabs encoder options. + /// + public class AdvancedEncoderOptionsCommand : IAdvancedEncoderOptionsCommand + { + /// + /// Clear out the advanced options + /// + public void ExecuteClearAdvanced() + { + IAdvancedViewModel advancedViewModel = IoC.Get(); + advancedViewModel.Clear(); + } + + /// + /// Clear the advanced encoder options out on the video tab. + /// + public void ExecuteClearVideo() + { + IVideoViewModel videoViewModel = IoC.Get(); + videoViewModel.ClearAdvancedSettings(); + } + } +} diff --git a/win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs b/win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs new file mode 100644 index 000000000..5f0c96fb2 --- /dev/null +++ b/win/CS/HandBrakeWPF/Commands/Interfaces/IAdvancedEncoderOptionsCommand.cs @@ -0,0 +1,27 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The AdvancedEncoderOptionsCommand interface. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Commands.Interfaces +{ + /// + /// The AdvancedEncoderOptionsCommand interface. + /// + public interface IAdvancedEncoderOptionsCommand + { + /// + /// Clear out the advanced options + /// + void ExecuteClearAdvanced(); + + /// + /// Clear the advanced encoder options out on the video tab. + /// + void ExecuteClearVideo(); + } +} \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 2d6aa9896..4b3afd937 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -122,8 +122,10 @@ + + Loading.xaml @@ -137,6 +139,7 @@ + diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 0978c2fca..ba0031cc6 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.269 +// Runtime Version:4.0.30319.296 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -285,5 +285,85 @@ namespace HandBrakeWPF.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 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. + /// + ///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. + ///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. + ///Suggested values are: 18 to 20 for Standard Definition and 20 t [rest of string was truncated]";. + /// + public static string Video_QualitySlider { + get { + return ResourceManager.GetString("Video_QualitySlider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The full x264 list of parameters: {0}. + /// + public static string Video_x264ExtraArgs { + get { + return ResourceManager.GetString("Video_x264ExtraArgs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reduce decoder CPU usage. + /// + ///Set this if your device is struggling to play the output. (i.e. dropped frames). + /// + public static string Video_x264FastDecode { + get { + return ResourceManager.GetString("Video_x264FastDecode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sets and ensures compliance with the specified H.264 Levels. This will override all other settings.. + /// + public static string Video_x264Level { + get { + return ResourceManager.GetString("Video_x264Level", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adjusts x264 settings to trade off compression efficiency against encoding speed. + /// + ///This establishes your default x264 settings. Tunes, profiles, levels and advanced options string will be applied to this. + /// + ///You should generally set this option to the slowest you can bear since slower settings will result in better quality or smaller files.. + /// + public static string Video_x264Preset { + get { + return ResourceManager.GetString("Video_x264Preset", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Limit the H.264 profile of the output stream. This will override all other settings.. + /// + public static string Video_x264Profile { + get { + return ResourceManager.GetString("Video_x264Profile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tune settings to optimise for common scenarios + /// + ///This can improve efficiency for particular source characteristics or set of characteristics of the output file. + /// + ///Changes will be applied after the preset but before all other parameters.. + /// + public static string Video_x264Tune { + get { + return ResourceManager.GetString("Video_x264Tune", resourceCulture); + } + } } } diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 9c92427cb..6265c3fc9 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -237,4 +237,44 @@ may have problems with Weighted P-frame prediction: the Apple TV is completely i ..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + The full x264 list of parameters: {0} + + + Reduce decoder CPU usage. + +Set this if your device is struggling to play the output. (i.e. dropped frames) + + + Sets and ensures compliance with the specified H.264 Levels. This will override all other settings. + + + Adjusts x264 settings to trade off compression efficiency against encoding speed. + +This establishes your default x264 settings. Tunes, profiles, levels and advanced options string will be applied to this. + +You should generally set this option to the slowest you can bear since slower settings will result in better quality or smaller files. + + + Limit the H.264 profile of the output stream. This will override all other settings. + + + Tune settings to optimise for common scenarios + +This can improve efficiency for particular source characteristics or set of characteristics of the output file. + +Changes will be applied after the preset but before all other parameters. + + + Set the desired quality factor. The encoder targets a certain quality. +The scale used by each video encoder is different. + +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. +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. +Suggested values are: 18 to 20 for Standard Definition and 20 to 23 for High Definition. + +FFMpeg's and Theora's scale is more linear. These encoders do not have a lossless mode. + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs index 24666874c..5b06c97ba 100644 --- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -23,6 +23,9 @@ namespace HandBrakeWPF.Startup using HandBrake.ApplicationServices; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrakeWPF.Commands; + using HandBrakeWPF.Commands.Interfaces; + using ViewModels; using ViewModels.Interfaces; @@ -59,6 +62,9 @@ namespace HandBrakeWPF.Startup this.windsorContainer.Register(Component.For().ImplementedBy().LifeStyle.Is(LifestyleType.Singleton)); this.windsorContainer.Register(Component.For().ImplementedBy().LifeStyle.Is(LifestyleType.Singleton)); + // Commands + this.windsorContainer.Register(Component.For().ImplementedBy().LifeStyle.Is(LifestyleType.Singleton)); + // Shell this.windsorContainer.Register(Component.For().ImplementedBy().LifeStyle.Is(LifestyleType.Singleton)); this.windsorContainer.Register(Component.For().ImplementedBy().LifeStyle.Is(LifestyleType.Singleton)); diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index fb35f0cdb..01fcea409 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -211,6 +211,11 @@ namespace HandBrakeWPF /// public const string HandBrakePlatform = "HandBrakePlatform"; + /// + /// The show advanced tab. + /// + public const string ShowAdvancedTab = "ShowAdvancedTab"; + #endregion } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index 8e3c13e37..29b4bed48 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Parsing; using HandBrake.Interop.Model.Encoding; + using HandBrakeWPF.Commands.Interfaces; using HandBrakeWPF.Helpers; using HandBrakeWPF.Model; using HandBrakeWPF.ViewModels.Interfaces; @@ -27,6 +28,11 @@ namespace HandBrakeWPF.ViewModels /// public class AdvancedViewModel : ViewModelBase, IAdvancedViewModel { + /// + /// The advanced encoder options command. + /// + private readonly IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand; + #region Constants and Fields /// @@ -166,8 +172,9 @@ namespace HandBrakeWPF.ViewModels /// /// Initializes a new instance of the class. /// - public AdvancedViewModel() + public AdvancedViewModel(IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand) { + this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand; this.Task = new EncodeTask(); this.UpdateUIFromAdvancedOptions(); } @@ -243,6 +250,12 @@ namespace HandBrakeWPF.ViewModels this.Task.AdvancedEncoderOptions = value; this.UpdateUIFromAdvancedOptions(); this.NotifyOfPropertyChange(() => this.AdvancedOptionsString); + + // Reset the video tab if the user is using this tab. + if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions)) + { + this.advancedEncoderOptionsCommand.ExecuteClearVideo(); + } } } @@ -630,14 +643,6 @@ namespace HandBrakeWPF.ViewModels #region Public Methods - /// - /// The notify all changed. - /// - public void NotifyAllChanged() - { - this.NotifyOfPropertyChange(() => this.AdvancedOptionsString); - } - /// /// The update ui from advanced options. /// @@ -884,8 +889,6 @@ namespace HandBrakeWPF.ViewModels } } - break; - default: break; } } @@ -933,6 +936,14 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// The clear. + /// + public void Clear() + { + this.AdvancedOptionsString = string.Empty; + } + #endregion #region ITabInterface @@ -1042,7 +1053,7 @@ namespace HandBrakeWPF.ViewModels int equalsIndex = existingSegment.IndexOf('='); if (equalsIndex >= 0) { - optionName = existingSegment.Substring(0, existingSegment.IndexOf("=")); + optionName = existingSegment.Substring(0, existingSegment.IndexOf("=", System.StringComparison.Ordinal)); } if (!this.uiOptions.Contains(optionName) && optionName != string.Empty) @@ -1154,6 +1165,12 @@ namespace HandBrakeWPF.ViewModels this.Task.AdvancedEncoderOptions = string.Join(":", newOptions); this.NotifyOfPropertyChange(() => this.AdvancedOptionsString); + + // Reset the video tab if the user is using this tab. + if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions)) + { + this.advancedEncoderOptionsCommand.ExecuteClearVideo(); + } } #endregion diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs index 9114bea32..a84a79f6a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs @@ -23,5 +23,10 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// The Video Encoder. /// void SetEncoder(VideoEncoder encoder); + + /// + /// Clear out the settings. + /// + void Clear(); } } diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs index d3b162501..d3602e5e5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs @@ -18,5 +18,10 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// Trigger a Notify Property Changed on the Task to force various UI elements to update. /// void RefreshTask(); + + /// + /// Clear the advanced x264 options. + /// + void ClearAdvancedSettings(); } } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 6577dfc5c..fee34fcb7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -621,10 +621,6 @@ namespace HandBrakeWPF.ViewModels /// public CancelScanCommand CancelScanCommand { get; set; } - #endregion - - #region Properties for Settings - /// /// Gets or sets Destination. /// @@ -820,6 +816,17 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Gets a value indicating whether show advanced tab. + /// + public bool ShowAdvancedTab + { + get + { + return this.userSettingService.GetUserSetting(UserSettingConstants.ShowAdvancedTab); + } + } + #endregion #region Load and Shutdown Handling diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 273a2f6d5..82c0daa3c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -19,10 +19,7 @@ namespace HandBrakeWPF.ViewModels using System.Linq; using System.Windows; - using Caliburn.Micro; - using HandBrake.ApplicationServices; - using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; @@ -354,6 +351,11 @@ namespace HandBrakeWPF.ViewModels /// private bool enableLibHb; + /// + /// The show advanced tab backing field. + /// + private bool showAdvancedTab; + #endregion #region Constructors and Destructors @@ -1373,6 +1375,22 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Gets or sets a value indicating whether enable lib hb. + /// + public bool ShowAdvancedTab + { + get + { + return this.showAdvancedTab; + } + set + { + this.showAdvancedTab = value; + this.NotifyOfPropertyChange(() => this.ShowAdvancedTab); + } + } + #endregion #endregion @@ -1638,6 +1656,7 @@ namespace HandBrakeWPF.ViewModels this.MinimiseToTray = this.userSettingService.GetUserSetting(UserSettingConstants.MainWindowMinimize); this.DisablePresetUpdateCheckNotification = this.userSettingService.GetUserSetting(UserSettingConstants.PresetNotification); this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue); + this.ShowAdvancedTab = userSettingService.GetUserSetting(UserSettingConstants.ShowAdvancedTab); // Set the preview count this.PreviewPicturesToScan.Clear(); @@ -1653,7 +1672,6 @@ namespace HandBrakeWPF.ViewModels this.ConstantQualityGranularity.Add("1.00"); this.ConstantQualityGranularity.Add("0.50"); this.ConstantQualityGranularity.Add("0.25"); - this.ConstantQualityGranularity.Add("0.20"); this.SelectedGranulairty = userSettingService.GetUserSetting(UserSettingConstants.X264Step).ToString("0.00", CultureInfo.InvariantCulture); // Min Title Length @@ -1873,6 +1891,7 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted); userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount); userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture)); + userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab); int value; if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value)) diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index dba17ea7a..c4acd7fa8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -11,7 +11,9 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Globalization; + using System.Linq; using Caliburn.Micro; @@ -20,8 +22,13 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Parsing; 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; /// @@ -30,16 +37,25 @@ namespace HandBrakeWPF.ViewModels public class VideoViewModel : ViewModelBase, IVideoViewModel { #region Constants and Fields - /// /// Same as source constant. /// private const string SameAsSource = "Same as source"; + /// + /// The possible h264 levels. + /// + private static readonly List Levels = new List { "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"}; + /// /// Backing field for the user setting service. /// - private IUserSettingService userSettingService; + private readonly IUserSettingService userSettingService; + + /// + /// The advanced encoder options command + /// + private readonly IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand; /// /// Backing field used to display / hide the x264 options @@ -66,6 +82,21 @@ namespace HandBrakeWPF.ViewModels /// private int rf; + /// + /// The x264 preset value. + /// + private int x264PresetValue; + + /// + /// The extra arguments. + /// + private string extraArguments; + + /// + /// The can clear tracker. + /// + private bool canClear; + #endregion #region Constructors and Destructors @@ -73,24 +104,26 @@ namespace HandBrakeWPF.ViewModels /// /// Initializes a new instance of the class. /// - /// - /// The window manager. - /// /// /// The user Setting Service. /// - public VideoViewModel(IWindowManager windowManager, IUserSettingService userSettingService) + /// + /// The advanced Encoder Options Command. + /// + public VideoViewModel(IUserSettingService userSettingService, IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand) { this.Task = new EncodeTask { VideoEncoder = VideoEncoder.X264 }; this.userSettingService = userSettingService; + this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand; this.QualityMin = 0; this.QualityMax = 51; this.IsConstantQuantity = true; this.VideoEncoders = EnumHelper.GetEnumList(); - //X264Presets = EnumHelper.GetEnumList(); - //X264Profiles = EnumHelper.GetEnumList(); - //X264Tunes = EnumHelper.GetEnumList(); + X264Presets = new BindingList(EnumHelper.GetEnumList().ToList()); + H264Profiles = EnumHelper.GetEnumList(); + X264Tunes = EnumHelper.GetEnumList().Where(t => t != x264Tune.Fastdecode); + this.H264Levels = Levels; } #endregion @@ -259,7 +292,7 @@ namespace HandBrakeWPF.ViewModels this.rf = value; double cqStep = userSettingService.GetUserSetting(UserSettingConstants.X264Step); - this.SetQualitySliderBounds(); + this.SetQualitySliderBounds(); switch (this.SelectedVideoEncoder) { case VideoEncoder.FFMpeg: @@ -379,6 +412,193 @@ namespace HandBrakeWPF.ViewModels /// public IEnumerable VideoEncoders { get; set; } + /// + /// Gets or sets the extra arguments. + /// + public string ExtraArguments + { + get + { + return this.extraArguments; + } + set + { + if (!object.Equals(this.extraArguments, value)) + { + this.extraArguments = value; + this.NotifyOfPropertyChange(() => this.ExtraArguments); + } + } + } + + /// + /// Gets or sets a value indicating whether display x 264 options. + /// + public bool DisplayX264Options + { + get + { + return this.displayX264Options; + } + set + { + this.displayX264Options = value; + this.NotifyOfPropertyChange(() => this.DisplayX264Options); + } + } + + /// + /// Gets or sets the x 264 preset value. + /// + public int X264PresetValue + { + get + { + return this.x264PresetValue; + } + set + { + if (!object.Equals(this.X264PresetValue, value)) + { + this.x264PresetValue = value; + this.X264Preset = this.X264Presets[value]; + this.NotifyOfPropertyChange(() => this.x264PresetValue); + } + } + } + + /// + /// Gets or sets X264Preset. + /// + public x264Preset X264Preset + { + get + { + return this.Task.X264Preset; + } + set + { + if (!object.Equals(this.X264Preset, value)) + { + this.Task.X264Preset = value; + this.NotifyOfPropertyChange(() => this.X264Preset); + ResetAdvancedTab(); + } + } + } + + /// + /// Gets or sets H264Profile. + /// + public x264Profile H264Profile + { + get + { + return this.Task.H264Profile; + } + + set + { + if (!object.Equals(this.H264Profile, value)) + { + this.Task.H264Profile = value; + this.NotifyOfPropertyChange(() => this.H264Profile); + ResetAdvancedTab(); + } + } + } + + /// + /// Gets or sets H264Profile. + /// + public string H264Level + { + get + { + return this.Task.H264Level; + } + set + { + if (!object.Equals(this.H264Level, value)) + { + this.Task.H264Level = value; + this.NotifyOfPropertyChange(() => this.H264Level); + ResetAdvancedTab(); + } + } + } + + /// + /// Gets or sets X264Tune. + /// + public x264Tune X264Tune + { + get + { + return this.Task.X264Tune; + } + set + { + if (!object.Equals(this.X264Tune, value)) + { + this.Task.X264Tune = value; + this.NotifyOfPropertyChange(() => this.X264Tune); + ResetAdvancedTab(); + } + } + } + + /// + /// Gets or sets a value indicating whether fast decode. + /// + public bool FastDecode + { + get + { + return this.Task.FastDecode; + } + set + { + if (!object.Equals(this.FastDecode, value)) + { + this.Task.FastDecode = value; + this.NotifyOfPropertyChange(() => this.FastDecode); + ResetAdvancedTab(); + } + } + } + + /// + /// Gets or sets X264Presets. + /// + public BindingList X264Presets { get; set; } + + /// + /// Gets or sets X264Profiles. + /// + public IEnumerable H264Profiles { get; set; } + + /// + /// Gets or sets X264Tunes. + /// + public IEnumerable X264Tunes { get; set; } + + /// + /// Gets or sets the x 264 levels. + /// + public IEnumerable H264Levels { get; set; } + + /// + /// Gets the full options tooltip. + /// + public string FullOptionsTooltip + { + get + { + return "You can provide additional arguments using the standard x264 format"; // string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query()); + } + } + #endregion #region Public Methods @@ -444,15 +664,15 @@ namespace HandBrakeWPF.ViewModels { case VideoEncoder.FFMpeg: case VideoEncoder.FFMpeg2: - int cq; if (preset.Task.Quality.HasValue) { + int cq; int.TryParse(preset.Task.Quality.Value.ToString(CultureInfo.InvariantCulture), out cq); this.RF = 32 - cq; } break; case VideoEncoder.X264: - + double multiplier = 1.0 / cqStep; if (preset.Task.Quality.HasValue) { @@ -477,15 +697,16 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.Task); - //if (preset != null && preset.Task != null) - //{ - // this.Query = preset.Task.AdvancedEncoderOptions; - // this.SetEncoder(preset.Task.VideoEncoder); - - // this.X264Preset = preset.Task.x264Preset; - // this.X264Profile = preset.Task.x264Profile; - // this.X264Tune = preset.Task.X264Tune; - //} + if (preset.Task != null) + { + this.SetEncoder(preset.Task.VideoEncoder); + this.X264PresetValue = preset.Task.VideoEncoder == VideoEncoder.X264 + ? (int)preset.Task.X264Preset + : (int)x264Preset.Medium; + this.H264Profile = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Profile : x264Profile.None; + this.X264Tune = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.X264Tune : x264Tune.None; + this.H264Level = preset.Task.H264Level; + } } /// @@ -518,7 +739,7 @@ namespace HandBrakeWPF.ViewModels /// public void SetEncoder(VideoEncoder encoder) { - //this.DisplayX264Options = encoder == VideoEncoder.X264; + this.DisplayX264Options = encoder == VideoEncoder.X264; } /// @@ -534,6 +755,21 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Clear advanced settings. + /// + public void ClearAdvancedSettings() + { + this.canClear = false; + this.X264PresetValue = 5; + this.X264Tune = x264Tune.None; + this.H264Profile = x264Profile.None; + this.FastDecode = false; + this.H264Level = "Auto"; + this.ExtraArguments = string.Empty; + this.canClear = true; + } + #endregion /// @@ -561,101 +797,44 @@ namespace HandBrakeWPF.ViewModels } } - #region Advanced - ///// - ///// Gets or sets State. - ///// - //public string Query - //{ - // get - // { - // return this.Task.AdvancedEncoderOptions; - // } - // set - // { - // this.Task.AdvancedEncoderOptions = value; - // this.NotifyOfPropertyChange(() => this.Query); - // } - //} - - ///// - ///// Gets or sets X264Preset. - ///// - //public x264Preset X264Preset - //{ - // get - // { - // return this.Task.x264Preset; - // } - // set - // { - // this.Task.x264Preset = value; - // this.NotifyOfPropertyChange(() => this.X264Preset); - // } - //} - - ///// - ///// Gets or sets X264Profile. - ///// - //public x264Profile X264Profile - //{ - // get - // { - // return this.Task.x264Profile; - // } - // set - // { - // this.Task.x264Profile = value; - // this.NotifyOfPropertyChange(() => this.X264Profile); - // } - //} - - ///// - ///// Gets or sets X264Tune. - ///// - //public x264Tune X264Tune - //{ - // get - // { - // return this.Task.X264Tune; - // } - // set - // { - // this.Task.X264Tune = value; - // this.NotifyOfPropertyChange(() => this.X264Tune); - // } - //} - - ///// - ///// Gets or sets X264Presets. - ///// - //public IEnumerable X264Presets { get; set; } - - ///// - ///// Gets or sets X264Profiles. - ///// - //public IEnumerable X264Profiles { get; set; } - - ///// - ///// Gets or sets X264Tunes. - ///// - //public IEnumerable X264Tunes { get; set; } - - ///// - ///// Gets or sets a value indicating whether DisplayX264Options. - ///// - //public bool DisplayX264Options - //{ - // get - // { - // return this.displayX264Options; - // } - // set - // { - // this.displayX264Options = value; - // this.NotifyOfPropertyChange(() => this.DisplayX264Options); - // } - //} - #endregion + /// + /// Reset advanced tab. + /// + private void ResetAdvancedTab() + { + if (canClear) + { + this.advancedEncoderOptionsCommand.ExecuteClearAdvanced(); + } + } + + /// + /// The get actualx 264 query. + /// + /// + /// The . + /// + private string GetActualx264Query() + { + string preset = EnumHelper.GetDisplay(this.X264Preset); + string profile = EnumHelper.GetDisplay(this.H264Profile); + + List tunes = new List(); + if (X264Tune != x264Tune.None) + { + tunes.Add(EnumHelper.GetDisplay(this.X264Tune)); + } + if (this.FastDecode) + { + tunes.Add("fastdecode"); + } + + // Get the width or height, default if we don't have it yet so we don't crash. + int width = this.Task.Width.HasValue ? this.Task.Width.Value : 720; + int height = this.Task.Height.HasValue ? this.Task.Height.Value : 576; + + // TODO figure out what is wrong with this?? + return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height); + } } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 5bed28974..76dbf7872 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -486,7 +486,7 @@ - + @@ -501,7 +501,7 @@ - + diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 2f3213a7f..c5d5d3e60 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -279,6 +279,7 @@ + diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 27f2a2f30..ffc027786 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -4,13 +4,18 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" - xmlns:Video="clr-namespace:HandBrakeWPF.Converters.Video" mc:Ignorable="d" > + xmlns:Video="clr-namespace:HandBrakeWPF.Converters.Video" + xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" mc:Ignorable="d" > + + @@ -25,6 +30,11 @@ + + + + + @@ -54,8 +64,10 @@ - - + + @@ -70,8 +82,10 @@ - + @@ -87,46 +101,67 @@ - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - --> - - - diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 80a1e6e2c..73d5742fc 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -5,7 +5,7 @@ X264Step - 0.25 + 1.0 @@ -473,4 +473,12 @@ false + + + ShowAdvancedTab + + + true + + \ No newline at end of file -- cgit v1.2.3