]> granicus.if.org Git - handbrake/commitdiff
WinGui: Extend the "Video" preference tab to allow the hardware encoders to be disabled.
authorsr55 <sr55.hb@outlook.com>
Fri, 29 Jun 2018 20:23:07 +0000 (21:23 +0100)
committersr55 <sr55.hb@outlook.com>
Fri, 29 Jun 2018 20:23:07 +0000 (21:23 +0100)
win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/UserSettingConstants.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/HandBrakeWPF/Views/VideoView.xaml
win/CS/HandBrakeWPF/defaultsettings.xml

index 40131ddb3ecb18ba99a72e994f8cabf6b03b2a8f..12ce80eca05e712825fff44e1e0fb9f83c7f91e3 100644 (file)
@@ -18,6 +18,7 @@ namespace HandBrakeWPF.Converters.Video
     using HandBrake.Interop.Interop;\r
     using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
+    using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.Utilities;\r
 \r
     using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;\r
@@ -49,8 +50,17 @@ namespace HandBrakeWPF.Converters.Video
         /// </returns>\r
         public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)\r
         {\r
-            if (values.Count() == 2)\r
+            if (values.Count() >= 2)\r
             {\r
+                IUserSettingService userSettingService = values[2] as IUserSettingService;\r
+                bool isQsvEnabled = false, isVceEnabled = false, isNvencEnabled = false;\r
+                if (userSettingService != null)\r
+                {\r
+                    isQsvEnabled = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableQuickSyncEncoding);\r
+                    isVceEnabled = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableVceEncoder);\r
+                    isNvencEnabled = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableNvencEncoder);\r
+                }\r
+                \r
                 List<VideoEncoder> encoders = EnumHelper<VideoEncoder>.GetEnumList().ToList();\r
                 EncodeTask task = values[1] as EncodeTask;\r
 \r
@@ -76,12 +86,12 @@ namespace HandBrakeWPF.Converters.Video
                     encoders.Remove(VideoEncoder.VP9);\r
                 }\r
 \r
-                if (!SystemInfo.IsQsvAvailableH264)\r
+                if (!isQsvEnabled || !SystemInfo.IsQsvAvailableH264)\r
                 {\r
                     encoders.Remove(VideoEncoder.QuickSync);\r
                 }\r
 \r
-                if (!SystemInfo.IsQsvAvailableH265)\r
+                if (!isQsvEnabled || !SystemInfo.IsQsvAvailableH265)\r
                 {\r
                     encoders.Remove(VideoEncoder.QuickSyncH265);\r
                     encoders.Remove(VideoEncoder.QuickSyncH26510b);\r
@@ -91,22 +101,22 @@ namespace HandBrakeWPF.Converters.Video
                     encoders.Remove(VideoEncoder.QuickSyncH26510b);\r
                 }\r
 \r
-                if (!SystemInfo.IsVceH264Available)\r
+                if (!isVceEnabled || !SystemInfo.IsVceH264Available)\r
                 {\r
                     encoders.Remove(VideoEncoder.VceH264);\r
                 }\r
 \r
-                if (!SystemInfo.IsVceH265Available)\r
+                if (!isVceEnabled || !SystemInfo.IsVceH265Available)\r
                 {\r
                     encoders.Remove(VideoEncoder.VceH265);\r
                 }\r
 \r
-                if (!SystemInfo.IsNVEncH264Available)\r
+                if (!isNvencEnabled || !SystemInfo.IsNVEncH264Available)\r
                 {\r
                     encoders.Remove(VideoEncoder.NvencH264);\r
                 }\r
 \r
-                if (!SystemInfo.IsNVEncH265Available)\r
+                if (!isNvencEnabled || !SystemInfo.IsNVEncH265Available)\r
                 {\r
                     encoders.Remove(VideoEncoder.NvencH265);\r
                 }\r
index cc359053b6d4ddc7963dacc6d2d893d742fe36db..bbdb6e97e2c5f0f81dc7009e88d41cbbf254e31f 100644 (file)
@@ -1347,6 +1347,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Encoding.\r
+        /// </summary>\r
+        public static string Options_Encoding {\r
+            get {\r
+                return ResourceManager.GetString("Options_Encoding", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to File Format:.\r
         /// </summary>\r
@@ -1671,6 +1680,33 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Enable Nvidia NVENC Encoder.\r
+        /// </summary>\r
+        public static string OptionsView_EnableNvencEncoding {\r
+            get {\r
+                return ResourceManager.GetString("OptionsView_EnableNvencEncoding", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Enable Intel QuickSync Encoder.\r
+        /// </summary>\r
+        public static string OptionsView_EnableQuicksyncEncoding {\r
+            get {\r
+                return ResourceManager.GetString("OptionsView_EnableQuicksyncEncoding", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Enable AMD VCE Encoder.\r
+        /// </summary>\r
+        public static string OptionsView_EnableVceEncoding {\r
+            get {\r
+                return ResourceManager.GetString("OptionsView_EnableVceEncoding", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to The file format entered contained invalid characters. These have been removed. .\r
         /// </summary>\r
index 4e188b0cec009391e501f5569ca4322b2c9e4472..056a3ad679ddca8bf606fbd1053c4ffa6fdeff66 100644 (file)
@@ -1028,4 +1028,16 @@ This will not affect your current settings in the Subtitle tab.</value>
   <data name="MainView_SubtitleBeforeScanError" xml:space="preserve">\r
     <value>Please choose a source to encode before trying to import a subtitle file.</value>\r
   </data>\r
+  <data name="OptionsView_EnableNvencEncoding" xml:space="preserve">\r
+    <value>Enable Nvidia NVENC Encoder</value>\r
+  </data>\r
+  <data name="OptionsView_EnableQuicksyncEncoding" xml:space="preserve">\r
+    <value>Enable Intel QuickSync Encoder</value>\r
+  </data>\r
+  <data name="OptionsView_EnableVceEncoding" xml:space="preserve">\r
+    <value>Enable AMD VCE Encoder</value>\r
+  </data>\r
+  <data name="Options_Encoding" xml:space="preserve">\r
+    <value>Encoding</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 9e4d37a17c8e0c467cee84a87da3f40ba48d16b9..cf87b6cecf1b98bb8fb3338300162f697fcd1813 100644 (file)
@@ -16,255 +16,59 @@ namespace HandBrakeWPF
     {\r
         #region Constants and Fields\r
 \r
-        /// <summary>\r
-        /// Auto name format\r
-        /// </summary>\r
         public const string AutoNameFormat = "autoNameFormat";\r
-\r
-        /// <summary>\r
-        /// Autoname path\r
-        /// </summary>\r
         public const string AutoNamePath = "autoNamePath";\r
-\r
-        /// <summary>\r
-        /// Auto Name Remove underscore\r
-        /// </summary>\r
         public const string AutoNameRemoveUnderscore = "AutoNameRemoveUnderscore";\r
-\r
-        /// <summary>\r
-        /// Auto Name Title Case\r
-        /// </summary>\r
         public const string AutoNameTitleCase = "AutoNameTitleCase";\r
-\r
-        /// <summary>\r
-        /// Auto Naming\r
-        /// </summary>\r
         public const string AutoNaming = "autoNaming";\r
-\r
-        /// <summary>\r
-        /// Clear old logs\r
-        /// </summary>\r
         public const string ClearOldLogs = "clearOldLogs";\r
-\r
-        /// <summary>\r
-        /// Update check interval\r
-        /// </summary>\r
         public const string DaysBetweenUpdateCheck = "daysBetweenUpdateCheck";\r
-\r
-        /// <summary>\r
-        /// Use Default Player\r
-        /// </summary>\r
         public const string DefaultPlayer = "defaultPlayer";\r
-\r
-        /// <summary>\r
-        /// Last Update Check\r
-        /// </summary>\r
         public const string LastUpdateCheckDate = "lastUpdateCheckDate";\r
-\r
-        /// <summary>\r
-        /// Main Window Minimize\r
-        /// </summary>\r
         public const string MainWindowMinimize = "MainWindowMinimize";\r
-\r
-        /// <summary>\r
-        /// Min Title Length\r
-        /// </summary>\r
         public const string MinTitleLength = "MinTitleLength";\r
-\r
-        /// <summary>\r
-        /// Update Status\r
-        /// </summary>\r
         public const string UpdateStatus = "updateStatus";\r
-\r
-        /// <summary>\r
-        /// Use m4v\r
-        /// </summary>\r
         public const string UseM4v = "useM4v";\r
-\r
-        /// <summary>\r
-        /// Vlc Path\r
-        /// </summary>\r
         public const string VLCPath = "VLC_Path";\r
-\r
-        /// <summary>\r
-        /// The Instance Id\r
-        /// </summary>\r
         public const string InstanceId = "InstanceId";\r
-\r
-        /// <summary>\r
-        /// The X264 Stepper \r
-        /// </summary>\r
         public const string X264Step = "X264Step";\r
-\r
-        /// <summary>\r
-        /// The show advanced tab.\r
-        /// </summary>\r
         public const string ShowAdvancedTab = "ShowAdvancedTab";\r
-\r
-        /// <summary>\r
-        /// The last preview duration\r
-        /// </summary>\r
         public const string LastPreviewDuration = "LastPreviewDuration";\r
-\r
-        /// <summary>\r
-        /// When Complete Action\r
-        /// </summary>\r
         public const string WhenCompleteAction = "WhenCompleteAction";\r
-\r
-        /// <summary>\r
-        /// Send file enabled.\r
-        /// </summary>\r
         public const string SendFile = "SendFile";\r
-\r
-        /// <summary>\r
-        /// Send file to application path\r
-        /// </summary>\r
         public const string SendFileTo = "SendFileTo";\r
-\r
-        /// <summary>\r
-        /// Send file to arguments\r
-        /// </summary>\r
         public const string SendFileToArgs = "SendFileToArgs";\r
-\r
-        /// <summary>\r
-        /// Prevent Sleep\r
-        /// </summary>\r
         public const string PreventSleep = "PreventSleep";\r
-\r
-        /// <summary>\r
-        /// Pause Queue on Low Disk Space\r
-        /// </summary>\r
         public const string PauseOnLowDiskspace = "PauseOnLowDiskspace";\r
-\r
-        /// <summary>\r
-        /// Low Disk Space Warning Level in Bytes.\r
-        /// </summary>\r
         public const string PauseOnLowDiskspaceLevel = "LowDiskSpaceWarningLevelInBytes";\r
-\r
-        /// <summary>\r
-        /// The remove punctuation.\r
-        /// </summary>\r
         public const string RemovePunctuation = "RemovePunctuation";\r
-\r
-        /// <summary>\r
-        /// The Show Preset Panel\r
-        /// </summary>\r
         public const string ShowPresetPanel = "ShowPresetPanelOption";\r
-\r
-        /// <summary>\r
-        /// The reset when done action.\r
-        /// </summary>\r
         public const string ResetWhenDoneAction = "ResetWhenDoneAction";\r
-\r
-        /// <summary>\r
-        /// The disable lib dvd nav.\r
-        /// </summary>\r
         public const string DisableLibDvdNav = "DisableLibDvdNav";\r
-\r
-        /// <summary>\r
-        /// The disable quick sync decoding.\r
-        /// </summary>\r
         public const string EnableQuickSyncDecoding = "EnableQuickSyncDecoding";\r
-\r
-        /// <summary>\r
-        /// Setting indicating whether to use qsv decode for non qsv encoders\r
-        /// </summary>\r
         public const string UseQSVDecodeForNonQSVEnc = "UseQSVDecodeForNonQSVEnc";\r
-\r
-        /// <summary>\r
-        /// The scaling mode.\r
-        /// </summary>\r
         public const string ScalingMode = "ScalingMode";\r
-\r
-        /// <summary>\r
-        /// Preview Scan Count\r
-        /// </summary>\r
         public const string PreviewScanCount = "previewScanCount";\r
-\r
-        /// <summary>\r
-        /// The Verbosity\r
-        /// </summary>\r
         public const string Verbosity = "Verbosity";\r
-\r
-        /// <summary>\r
-        /// Min Title Scan Duration\r
-        /// </summary>\r
         public const string MinScanDuration = "MinTitleScanDuration";\r
-\r
-        /// <summary>\r
-        /// Process Priority\r
-        /// </summary>\r
         public const string ProcessPriority = "ProcessPriority";\r
-\r
-        /// <summary>\r
-        /// Save Log Directory\r
-        /// </summary>\r
         public const string SaveLogToCopyDirectory = "SaveLogToCopyDirectory";\r
-\r
-        /// <summary>\r
-        /// Save log with video\r
-        /// </summary>\r
         public const string SaveLogWithVideo = "SaveLogWithVideo";\r
-\r
-        /// <summary>\r
-        /// Save copy of the log to a directory\r
-        /// </summary>\r
         public const string SaveLogCopyDirectory = "SaveLogCopyDirectory";\r
-\r
-        /// <summary>\r
-        /// The clear completed from queue.\r
-        /// </summary>\r
         public const string ClearCompletedFromQueue = "ClearCompletedFromQueue";\r
-\r
-        /// <summary>\r
-        /// The Show Queue in-line option.\r
-        /// </summary>\r
         public const string ShowQueueInline = "ShowQueueInline";\r
-\r
-        /// <summary>\r
-        /// Setting to allow mid-version upgrades of presets.\r
-        /// </summary>\r
         public const string ForcePresetReset = "ForcePresetReset";\r
-\r
-        /// <summary>\r
-        /// Setting to record the expansion state of preset categories. \r
-        /// </summary>\r
         public const string PresetExpandedStateList = "PresetExpandedStateList";\r
-\r
-        /// <summary>\r
-        /// Setting to turn on/off the ability to show status in the title bar.\r
-        /// </summary>\r
         public const string ShowStatusInTitleBar = "ShowStatusInTitleBar";\r
-\r
-        /// <summary>\r
-        /// Setting to turn on/off the ability to show previews in the summary tab.\r
-        /// </summary>\r
         public const string ShowPreviewOnSummaryTab = "ShowPreviewOnSummaryTab";\r
-\r
-        /// <summary>\r
-        /// Setting to turn on/off the ability to play a sound when an encodeis done.\r
-        /// </summary>\r
-        public static string PlaySoundWhenDone = "PlaySoundWhenDone";\r
-\r
-        /// <summary>\r
-        /// Setting to turn on/off the ability to play a sound when a queue is completed.\r
-        /// </summary>\r
-        public static string PlaySoundWhenQueueDone = "PlaySoundWhenQueueDone";\r
-\r
-        /// <summary>\r
-        /// Setting to store the file to play when done.\r
-        /// </summary>\r
-        public static string WhenDoneAudioFile = "WhenDoneAudioFile";\r
-\r
-        /// <summary>\r
-        /// Setting to store whether we are using a Worker Process or in-process encoding.\r
-        /// </summary>\r
-        public static string RemoteServiceEnabled = "RemoteServiceEnabled";\r
-\r
-        /// <summary>\r
-        /// The port that the worker process is running on.\r
-        /// </summary>\r
-        public static string RemoteServicePort = "RemoteServicePort";\r
+        public const string PlaySoundWhenDone = "PlaySoundWhenDone";\r
+        public const string PlaySoundWhenQueueDone = "PlaySoundWhenQueueDone";\r
+        public const string WhenDoneAudioFile = "WhenDoneAudioFile";\r
+        public const string RemoteServiceEnabled = "RemoteServiceEnabled";\r
+        public const string RemoteServicePort = "RemoteServicePort";\r
+        public const string EnableQuickSyncEncoding = "EnableQuickSyncEncoding";\r
+        public const string EnableVceEncoder = "EnableVceEncoder";\r
+        public const string EnableNvencEncoder = "EnableNvencEncoder";\r
 \r
         #endregion\r
     }\r
index 8d542a3b0e009f983a85fcdefa8f19eaf7ccf9ce..3ad88a97e6f2757386240b101dbeaee515049e27 100644 (file)
@@ -101,6 +101,12 @@ namespace HandBrakeWPF.ViewModels
         private bool playSoundWhenDone;\r
         private bool playSoundWhenQueueDone;\r
 \r
+        private bool enableQuickSyncEncoding;\r
+\r
+        private bool enableVceEncoder;\r
+\r
+        private bool enableNvencEncoder;\r
+\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -986,15 +992,58 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Video\r
 \r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether disable quick sync decoding.\r
-        /// </summary>\r
+        public bool EnableQuickSyncEncoding\r
+        {\r
+            get => this.enableQuickSyncEncoding && this.IsQuickSyncAvailable;\r
+            set\r
+            {\r
+                if (value == this.enableQuickSyncEncoding)\r
+                {\r
+                    return;\r
+                }\r
+\r
+                this.enableQuickSyncEncoding = value;\r
+                this.NotifyOfPropertyChange(() => this.EnableQuickSyncEncoding);\r
+            }\r
+        }\r
+\r
+        public bool EnableVceEncoder\r
+        {\r
+            get => this.enableVceEncoder && this.IsVceAvailable;\r
+            set\r
+            {\r
+                if (value == this.enableVceEncoder)\r
+                {\r
+                    return;\r
+                }\r
+\r
+                this.enableVceEncoder = value;\r
+                this.NotifyOfPropertyChange(() => this.EnableVceEncoder);\r
+            }\r
+        }\r
+\r
+        public bool EnableNvencEncoder\r
+        {\r
+            get => this.enableNvencEncoder && this.IsNvencAvailable;\r
+            set\r
+            {\r
+                if (value == this.enableNvencEncoder)\r
+                {\r
+                    return;\r
+                }\r
+\r
+                this.enableNvencEncoder = value;\r
+                this.NotifyOfPropertyChange(() => this.EnableNvencEncoder);\r
+            }\r
+        }\r
+\r
         public bool EnableQuickSyncDecoding\r
         {\r
             get\r
             {\r
                 return this.enableQuickSyncDecoding;\r
             }\r
+\r
             set\r
             {\r
                 if (value.Equals(this.enableQuickSyncDecoding))\r
@@ -1007,14 +1056,8 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        /// <summary>\r
-        /// Gets or sets the selected scaling mode.\r
-        /// </summary>\r
         public VideoScaler SelectedScalingMode { get; set; }\r
 \r
-        /// <summary>\r
-        /// Gets a value indicating whether is quick sync available.\r
-        /// </summary>\r
         public bool IsQuickSyncAvailable\r
         {\r
             get\r
@@ -1023,6 +1066,23 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        public bool IsVceAvailable\r
+        {\r
+            get\r
+            {\r
+                string foundGpu = Utilities.SystemInfo.GetGPUInfo.FirstOrDefault(g => g.Contains("AMD"));\r
+                return SystemInfo.IsVceH264Available && !string.IsNullOrEmpty(foundGpu);\r
+            }\r
+        }\r
+\r
+        public bool IsNvencAvailable\r
+        {\r
+            get\r
+            {\r
+                return SystemInfo.IsNVEncH264Available;\r
+            }\r
+        }\r
+\r
         /// <summary>\r
         /// Gets a value indicating whether is use qsv dec available.\r
         /// </summary>\r
@@ -1034,15 +1094,13 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether to use qsv decode for non qsv encoders\r
-        /// </summary>\r
         public bool UseQSVDecodeForNonQSVEnc\r
         {\r
             get\r
             {\r
                 return this.useQsvDecodeForNonQsvEnc;\r
             }\r
+\r
             set\r
             {\r
                 if (value == this.useQsvDecodeForNonQsvEnc) return;\r
@@ -1051,9 +1109,6 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        /// <summary>\r
-        /// Gets the scaling options.\r
-        /// </summary>\r
         public BindingList<VideoScaler> ScalingOptions\r
         {\r
             get\r
@@ -1348,6 +1403,10 @@ namespace HandBrakeWPF.ViewModels
             this.SelectedScalingMode = this.userSettingService.GetUserSetting<VideoScaler>(UserSettingConstants.ScalingMode);\r
             this.UseQSVDecodeForNonQSVEnc = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseQSVDecodeForNonQSVEnc);\r
 \r
+            this.EnableQuickSyncEncoding = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableQuickSyncEncoding);\r
+            this.EnableVceEncoder = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableVceEncoder);\r
+            this.EnableNvencEncoder = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableNvencEncoder);\r
+\r
             // #############################\r
             // CLI\r
             // #############################\r
@@ -1484,6 +1543,10 @@ namespace HandBrakeWPF.ViewModels
             this.userSettingService.SetUserSetting(UserSettingConstants.ScalingMode, this.SelectedScalingMode);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.UseQSVDecodeForNonQSVEnc, this.UseQSVDecodeForNonQSVEnc);\r
 \r
+            this.userSettingService.SetUserSetting(UserSettingConstants.EnableQuickSyncEncoding, this.EnableQuickSyncEncoding);\r
+            this.userSettingService.SetUserSetting(UserSettingConstants.EnableVceEncoder, this.EnableVceEncoder);\r
+            this.userSettingService.SetUserSetting(UserSettingConstants.EnableNvencEncoder, this.EnableNvencEncoder);\r
+\r
             /* System and Logging */\r
             userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);\r
             userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep);\r
index 74ac53a8530f0fa9892fb0f1bc8362059b46b7bb..7c14e15943a545192f9a566c4ca989af926cb65d 100644 (file)
@@ -101,6 +101,8 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Public Properties\r
 \r
+        public IUserSettingService UserSettingService => this.userSettingService;\r
+\r
         /// <summary>\r
         /// Gets or sets the current Encode Task.\r
         /// </summary>\r
@@ -530,17 +532,6 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        private void HandleRFChange()\r
-        {\r
-            double displayRF = this.DisplayRF;\r
-            if (displayRF > this.QualityMax || displayRF < this.QualityMin)\r
-            {\r
-                displayRF = this.qualityMax / 2;\r
-            }\r
-\r
-            this.SetRF(displayRF);\r
-        }\r
-\r
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowPeakFramerate.\r
         /// </summary>\r
@@ -1279,6 +1270,7 @@ namespace HandBrakeWPF.ViewModels
             if (e.Key == UserSettingConstants.ShowAdvancedTab)\r
             {\r
                 this.NotifyOfPropertyChange(() => this.IsAdvancedTabOptionEnabled);\r
+                this.NotifyOfPropertyChange(() => this.VideoEncoders);\r
             }\r
         }\r
 \r
@@ -1507,5 +1499,16 @@ namespace HandBrakeWPF.ViewModels
             string result;\r
             this.ExtraArguments = this.encoderOptions.TryGetValue(EnumHelper<VideoEncoder>.GetShortName(selectedEncoder), out result) ? result : string.Empty;\r
         }\r
+\r
+        private void HandleRFChange()\r
+        {\r
+            double displayRF = this.DisplayRF;\r
+            if (displayRF > this.QualityMax || displayRF < this.QualityMin)\r
+            {\r
+                displayRF = this.qualityMax / 2;\r
+            }\r
+\r
+            this.SetRF(displayRF);\r
+        }\r
     }\r
 }
\ No newline at end of file
index cf2c877e52bd53d7bb6faf532f558b98e5d241a8..aa728d6c36af079dbe9f5c273ae44d6d49597bf0 100644 (file)
 \r
                     <StackPanel Orientation="Vertical" Margin="0,0,0,20">\r
 \r
-                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Decoding}" FontSize="14" Margin="0,10,0,10" />\r
+                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Encoding}" FontSize="14" Margin="0,10,0,10" />\r
+                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
+                            <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_EnableQuicksyncEncoding}" IsEnabled="{Binding IsQuickSyncAvailable}" IsChecked="{Binding EnableQuickSyncEncoding}" />\r
+                            <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_EnableVceEncoding}" IsEnabled="{Binding IsVceAvailable}" IsChecked="{Binding EnableVceEncoder}" />\r
+                            <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_EnableNvencEncoding}" IsEnabled="{Binding IsNvencAvailable}" IsChecked="{Binding EnableNvencEncoder}" />\r
+                        </StackPanel>\r
 \r
+                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Decoding}" FontSize="14" Margin="0,10,0,10" />\r
                         <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
                             <CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecode}" IsEnabled="{Binding IsQuickSyncAvailable}" IsChecked="{Binding EnableQuickSyncDecoding}" />\r
                             <CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecodeForNonFullPath}" Visibility="{Binding IsUseQsvDecAvailable, Converter={StaticResource boolToVisConverter}}" IsChecked="{Binding UseQSVDecodeForNonQSVEnc}" />\r
index ac615b18b9cd21abc9a9ea75677e16a44b0588e6..8c55b293afdeee97e45c68bf263323f065d8f255 100644 (file)
@@ -52,6 +52,7 @@
                             <MultiBinding Converter="{StaticResource videoEncoderConverter}">\r
                                 <Binding Path="VideoEncoders"/>\r
                                 <Binding Path="Task" />\r
+                                <Binding Path="UserSettingService" />\r
                             </MultiBinding>\r
                         </ComboBox.ItemsSource>\r
                     </ComboBox>\r
index 853cf5396470fa38283141281e030c312079fe01..d9f47ac912f686ee32587bf3c802e8f2bcd404eb 100644 (file)
       <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">8080</anyType>\r
     </value>\r
   </item>\r
+\r
+  <item>\r
+    <key>\r
+      <string>EnableQuickSyncEncoding</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
+  <item>\r
+    <key>\r
+      <string>EnableVceEncoder</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
+  <item>\r
+    <key>\r
+      <string>EnableNvencEncoder</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