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