diff options
author | sr55 <[email protected]> | 2012-06-14 19:22:31 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-14 19:22:31 +0000 |
commit | c3c5892ff08f931b0043d8c26e41b57f73f26205 (patch) | |
tree | 81e0ce86b095aa03ca0fd3cf4053e58b2ddccaf8 /win/CS/HandBrake.ApplicationServices/Services/Encode.cs | |
parent | a53a05ae0921b38cc1c9d3dd3dd5bab09a6c7f5f (diff) |
WinGui: Fix build and further clean out some legacy code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4735 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 8c04d5a3b..7553456d5 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -21,6 +21,7 @@ namespace HandBrake.ApplicationServices.Services using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Base;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.ApplicationServices.Utilities;
/// <summary>
/// Class which handles the CLI
@@ -120,7 +121,16 @@ namespace HandBrake.ApplicationServices.Services this.VerifyEncodeDestinationPath(currentTask);
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
- ProcessStartInfo cliStart = new ProcessStartInfo(handbrakeCLIPath, currentTask.Query)
+
+ // TODO tidy this code up, it's kinda messy.
+ string query = this.currentTask.Task.IsPreviewEncode
+ ? QueryGeneratorUtility.GeneratePreviewQuery(
+ new EncodeTask(this.currentTask.Task),
+ this.currentTask.Task.PreviewEncodeDuration,
+ this.currentTask.Task.PreviewEncodeStartAt)
+ : QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task));
+
+ ProcessStartInfo cliStart = new ProcessStartInfo(handbrakeCLIPath, query)
{
RedirectStandardOutput = true,
RedirectStandardError = enableLogging ? true : false,
|