summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-11-19 22:30:26 +0000
committersr55 <[email protected]>2013-11-19 22:30:26 +0000
commit830bb18b173a1c68720eb0df2ed860daea7d4c7e (patch)
tree780e4ad48d4917555121766f5e1f3eb838970042 /win/CS/HandBrake.ApplicationServices/Services/Encode.cs
parentf83ab26ab8e1d2ce277f0c12f23b5753bf63d763 (diff)
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
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs34
1 files changed, 4 insertions, 30 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 08394b88c..61bb1b575 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -29,11 +29,6 @@ namespace HandBrake.ApplicationServices.Services
#region Private Variables
/// <summary>
- /// The User Setting Service
- /// </summary>
- private readonly IUserSettingService userSettingService;
-
- /// <summary>
/// Gets the Process ID
/// </summary>
private int processId;
@@ -55,18 +50,6 @@ namespace HandBrake.ApplicationServices.Services
#endregion
- /// <summary>
- /// Initializes a new instance of the <see cref="Encode"/> class.
- /// </summary>
- /// <param name="userSettingService">
- /// The user Setting Service.
- /// </param>
- public Encode(IUserSettingService userSettingService)
- : base(userSettingService)
- {
- this.userSettingService = userSettingService;
- }
-
#region Properties
/// <summary>
@@ -130,19 +113,10 @@ namespace HandBrake.ApplicationServices.Services
string query = this.currentTask.Task.IsPreviewEncode
? QueryGeneratorUtility.GeneratePreviewQuery(
new EncodeTask(this.currentTask.Task),
+ encodeQueueTask.Configuration,
this.currentTask.Task.PreviewEncodeDuration,
- this.currentTask.Task.PreviewEncodeStartAt,
- userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
- userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
- encodeQueueTask.Configuration.IsDvdNavDisabled,
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableQuickSyncDecoding))
- : QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task),
- userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
- userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
- encodeQueueTask.Configuration.IsDvdNavDisabled,
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableQuickSyncDecoding),
- userSettingService.GetUserSetting<bool>(ASUserSettingConstants.EnableDxva),
- userSettingService.GetUserSetting<VideoScaler>(ASUserSettingConstants.ScalingMode) == VideoScaler.BicubicCl);
+ this.currentTask.Task.PreviewEncodeStartAt)
+ : QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task), encodeQueueTask.Configuration);
ProcessStartInfo cliStart = new ProcessStartInfo(handbrakeCLIPath, query)
{
@@ -177,7 +151,7 @@ namespace HandBrake.ApplicationServices.Services
}
// Set the Process Priority
- switch (this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.ProcessPriority))
+ switch (encodeQueueTask.Configuration.ProcessPriority)
{
case "Realtime":
this.HbProcess.PriorityClass = ProcessPriorityClass.RealTime;