summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-09-21 22:12:56 +0000
committersr55 <[email protected]>2013-09-21 22:12:56 +0000
commita27b2c176c84d290339f3bb0dc5b9f9961817b30 (patch)
treea1b38d3c0bb432ec6fcb998d51dc32b397fe88ed /win/CS/HandBrake.ApplicationServices
parentab17c5c37fcc9a9f8a1617505b3131b9196f1549 (diff)
WinGui: Added a new tab in Options to host "Video" related settings including hardware acceleration. Only showing the QuickSync options. DXVA/OpenCl options are hidden for now.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5794 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs15
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs35
4 files changed, 48 insertions, 11 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
index 78f5b18ab..f5ca3bef5 100644
--- a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
@@ -63,5 +63,20 @@ namespace HandBrake.ApplicationServices
/// Clear completed items from the queue automatically.
/// </summary>
public const string ClearCompletedFromQueue = "ClearCompletedFromQueue";
+
+ /// <summary>
+ /// The disable quick sync decoding.
+ /// </summary>
+ public const string DisableQuickSyncDecoding = "DisableQuickSyncDecoding";
+
+ /// <summary>
+ /// The enable dxva.
+ /// </summary>
+ public const string EnableDxva = "EnableDxva";
+
+ /// <summary>
+ /// The scaling mode.
+ /// </summary>
+ public const string ScalingMode = "ScalingMode";
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
index db4ef3abd..959ab1b1b 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
@@ -323,7 +323,8 @@ namespace HandBrake.ApplicationServices.Services.Base
string query = QueryGeneratorUtility.GenerateQuery(new EncodeTask(encodeQueueTask.Task),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav));
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav),
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableQuickSyncDecoding));
this.logBuffer = new StringBuilder();
this.logBuffer.AppendLine(String.Format("CLI Query: {0}", query));
this.logBuffer.AppendLine(String.Format("User Query: {0}", encodeQueueTask.CustomQuery));
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 806c08fa5..9e95b31cd 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -137,11 +137,13 @@ namespace HandBrake.ApplicationServices.Services
this.currentTask.Task.PreviewEncodeStartAt,
userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav))
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav),
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableQuickSyncDecoding))
: QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav));
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav),
+ userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableQuickSyncDecoding));
ProcessStartInfo cliStart = new ProcessStartInfo(handbrakeCLIPath, query)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
index 9e38d15d9..92cbdf4aa 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
@@ -15,8 +15,11 @@ namespace HandBrake.ApplicationServices.Utilities
using System.Globalization;
using System.IO;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
@@ -40,10 +43,13 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="disableLibDvdNav">
/// The disable Lib Dvd Nav.
/// </param>
+ /// <param name="disableQsvDecode">
+ /// The disable Qsv Decode.
+ /// </param>
/// <returns>
/// A Cli Query
/// </returns>
- public static string GenerateQuery(EncodeTask task, int previewScanCount, int verbosity, bool disableLibDvdNav)
+ public static string GenerateQuery(EncodeTask task, int previewScanCount, int verbosity, bool disableLibDvdNav, bool disableQsvDecode)
{
if (string.IsNullOrEmpty(task.Source))
{
@@ -53,7 +59,7 @@ namespace HandBrake.ApplicationServices.Utilities
string query = string.Empty;
query += SourceQuery(task, null, null, previewScanCount);
query += DestinationQuery(task);
- query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav);
+ query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav, disableQsvDecode);
return query;
}
@@ -79,15 +85,18 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="disableLibDvdNav">
/// The disable Lib Dvd Nav.
/// </param>
+ /// <param name="disableQsvDecode">
+ /// The disable Qsv Decode.
+ /// </param>
/// <returns>
/// A Cli query suitable for generating a preview video.
/// </returns>
- public static string GeneratePreviewQuery(EncodeTask task, int duration, string startAtPreview, int previewScanCount, int verbosity, bool disableLibDvdNav)
+ public static string GeneratePreviewQuery(EncodeTask task, int duration, string startAtPreview, int previewScanCount, int verbosity, bool disableLibDvdNav, bool disableQsvDecode)
{
string query = string.Empty;
query += SourceQuery(task, duration, startAtPreview, previewScanCount);
query += DestinationQuery(task);
- query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav);
+ query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav, disableQsvDecode);
return query;
}
@@ -109,10 +118,13 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="disableLibDvdNav">
/// The disable Lib Dvd Nav.
/// </param>
+ /// <param name="disableQsvDecode">
+ /// The disable Qsv Decode.
+ /// </param>
/// <returns>
/// The CLI query for the Tabbed section of the main window UI
/// </returns>
- private static string GenerateTabbedComponentsQuery(EncodeTask task, bool enableFilters, int verbosity, bool disableLibDvdNav)
+ private static string GenerateTabbedComponentsQuery(EncodeTask task, bool enableFilters, int verbosity, bool disableLibDvdNav, bool disableQsvDecode)
{
string query = string.Empty;
@@ -142,7 +154,7 @@ namespace HandBrake.ApplicationServices.Utilities
query += AdvancedQuery(task);
// Extra Settings
- query += ExtraSettings(verbosity, disableLibDvdNav);
+ query += ExtraSettings(verbosity, disableLibDvdNav, disableQsvDecode);
return query;
}
@@ -265,7 +277,7 @@ namespace HandBrake.ApplicationServices.Utilities
//if (task.HasCropping)
//{
- query += string.Format(" --crop {0}:{1}:{2}:{3}", task.Cropping.Top, task.Cropping.Bottom, task.Cropping.Left, task.Cropping.Right);
+ query += string.Format(" --crop {0}:{1}:{2}:{3}", task.Cropping.Top, task.Cropping.Bottom, task.Cropping.Left, task.Cropping.Right);
//}
switch (task.Anamorphic)
@@ -1009,10 +1021,13 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="disableLibdvdNav">
/// The disable Libdvd Nav.
/// </param>
+ /// <param name="disableQsvDecode">
+ /// The disable Qsv Decode.
+ /// </param>
/// <returns>
/// A Cli Query as a string
/// </returns>
- private static string ExtraSettings(int verbosity, bool disableLibdvdNav)
+ private static string ExtraSettings(int verbosity, bool disableLibdvdNav, bool disableQsvDecode)
{
string query = string.Empty;
@@ -1023,6 +1038,10 @@ namespace HandBrake.ApplicationServices.Utilities
if (disableLibdvdNav)
query += " --no-dvdnav";
+ if (disableQsvDecode)
+ query += " --disable-qsv-decoding";
+
+
return query;
}