From 830bb18b173a1c68720eb0df2ed860daea7d4c7e Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 19 Nov 2013 22:30:26 +0000 Subject: WinGui: Removed the need for the user settings service from IEncode and IScan interfaces and various other places. This makes the API much simpler to use. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5897 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Utilities/QueryGeneratorUtility.cs | 46 ++++++---------------- 1 file changed, 11 insertions(+), 35 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 30c1e9eb7..5552f1941 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -34,28 +34,13 @@ namespace HandBrake.ApplicationServices.Utilities /// /// The task. /// - /// - /// The preview Scan Count. - /// - /// - /// The verbosity. - /// - /// - /// The disable Lib Dvd Nav. - /// - /// - /// The disable Qsv Decode. - /// - /// - /// The enable Hwd. - /// - /// - /// The enable Open CL. + /// + /// The configuration. /// /// /// A Cli Query /// - public static string GenerateQuery(EncodeTask task, int previewScanCount, int verbosity, bool disableLibDvdNav, bool disableQsvDecode, bool enableHwd, bool enableOpenCL) + public static string GenerateQuery(EncodeTask task, HBConfiguration configuration) { if (string.IsNullOrEmpty(task.Source)) { @@ -63,9 +48,9 @@ namespace HandBrake.ApplicationServices.Utilities } string query = string.Empty; - query += SourceQuery(task, null, null, previewScanCount); + query += SourceQuery(task, null, null, configuration.PreviewScanCount); query += DestinationQuery(task); - query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav, disableQsvDecode, enableHwd, enableOpenCL); + query += GenerateTabbedComponentsQuery(task, true, configuration.Verbosity, configuration.IsDvdNavDisabled, configuration.DisableQuickSyncDecoding, configuration.EnableDxva, configuration.ScalingMode == VideoScaler.BicubicCl); return query; } @@ -76,33 +61,24 @@ namespace HandBrake.ApplicationServices.Utilities /// /// The task. /// + /// + /// The configuration. + /// /// /// The duration. /// /// /// The start At Preview. /// - /// - /// The preview Scan Count. - /// - /// - /// The verbosity. - /// - /// - /// The disable Lib Dvd Nav. - /// - /// - /// The disable Qsv Decode. - /// /// /// A Cli query suitable for generating a preview video. /// - public static string GeneratePreviewQuery(EncodeTask task, int duration, string startAtPreview, int previewScanCount, int verbosity, bool disableLibDvdNav, bool disableQsvDecode) + public static string GeneratePreviewQuery(EncodeTask task, HBConfiguration configuration, int duration, string startAtPreview) { string query = string.Empty; - query += SourceQuery(task, duration, startAtPreview, previewScanCount); + query += SourceQuery(task, duration, startAtPreview, configuration.PreviewScanCount); query += DestinationQuery(task); - query += GenerateTabbedComponentsQuery(task, true, verbosity, disableLibDvdNav, disableQsvDecode, false, false); + query += GenerateTabbedComponentsQuery(task, true, configuration.Verbosity, configuration.IsDvdNavDisabled, configuration.DisableQuickSyncDecoding, false, false); return query; } -- cgit v1.2.3