diff options
19 files changed, 103 insertions, 62 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index a8bb2a063..c3995689c 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -205,8 +205,6 @@ <Compile Include="Services\Encode\Model\EncodeTask.cs" />
<Compile Include="Services\Encode\Model\Models\OutputFormat.cs" />
<Compile Include="Services\Encode\Model\Models\SubtitleTrack.cs" />
- <Compile Include="Model\QueueItemStatus.cs" />
- <Compile Include="Model\QueueTask.cs" />
<Compile Include="Services\Encode\Model\Models\SubtitleType.cs" />
<Compile Include="Services\Scan\Model\Audio.cs" />
<Compile Include="Services\Scan\Model\Chapter.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs index 3ba8a847f..227a73f5e 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs @@ -11,15 +11,14 @@ namespace HandBrake.ApplicationServices.Services.Encode {
using System;
using System.Diagnostics;
- using System.Globalization;
using System.IO;
using System.Text;
- using System.Text.RegularExpressions;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
+ using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Utilities;
/// <summary>
@@ -237,13 +236,7 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <summary>
/// Setup the logging.
/// </summary>
- /// <param name="encodeQueueTask">
- /// The encode QueueTask.
- /// </param>
- /// <param name="isLibhb">
- /// Indicates if this is libhb that is encoding or not.
- /// </param>
- protected void SetupLogging(QueueTask encodeQueueTask, bool isLibhb)
+ protected void SetupLogging()
{
this.ShutdownFileWriter();
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
@@ -369,12 +362,12 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <exception cref="Exception">
/// If the creation fails, an exception is thrown.
/// </exception>
- protected void VerifyEncodeDestinationPath(QueueTask task)
+ protected void VerifyEncodeDestinationPath(EncodeTask task)
{
// Make sure the path exists, attempt to create it if it doesn't
try
{
- string path = Directory.GetParent(task.Task.Destination).ToString();
+ string path = Directory.GetParent(task.Destination).ToString();
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncode.cs index e0685d4ad..60a5744ad 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncode.cs @@ -13,6 +13,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Interfaces using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
+ using HandBrake.ApplicationServices.Services.Encode.Model;
/// <summary>
/// Encode Progess Status
@@ -82,7 +83,10 @@ namespace HandBrake.ApplicationServices.Services.Encode.Interfaces /// <param name="job">
/// The job.
/// </param>
- void Start(QueueTask job);
+ /// <param name="configuration">
+ /// The configuration.
+ /// </param>
+ void Start(EncodeTask job, HBConfiguration configuration);
/// <summary>
/// The pause.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 0ae99b964..3c92f9a6f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -15,10 +15,10 @@ namespace HandBrake.ApplicationServices.Services.Encode using HandBrake.ApplicationServices.Interop;
using HandBrake.ApplicationServices.Interop.EventArgs;
using HandBrake.ApplicationServices.Interop.Interfaces;
- using HandBrake.ApplicationServices.Interop.Model;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.Factories;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
+ using HandBrake.ApplicationServices.Services.Encode.Model;
/// <summary>
/// LibHB Implementation of IEncode
@@ -27,25 +27,11 @@ namespace HandBrake.ApplicationServices.Services.Encode {
#region Private Variables
- /// <summary>
- /// Lock for the log file
- /// </summary>
private static readonly object LogLock = new object();
-
- /// <summary>
- /// The instance.
- /// </summary>
private IHandBrakeInstance instance;
-
- /// <summary>
- /// The Start time of the current Encode;
- /// </summary>
private DateTime startTime;
-
- /// <summary>
- /// The Current Task
- /// </summary>
- private QueueTask currentTask;
+ private EncodeTask currentTask;
+ private HBConfiguration currentConfiguration;
#endregion
@@ -57,22 +43,26 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <summary>
/// Start with a LibHb EncodeJob Object
/// </summary>
- /// <param name="job">
- /// The job.
+ /// <param name="task">
+ /// The task.
+ /// </param>
+ /// <param name="configuration">
+ /// The configuration.
/// </param>
- public void Start(QueueTask job)
+ public void Start(EncodeTask task, HBConfiguration configuration)
{
try
{
// Setup
this.startTime = DateTime.Now;
- this.currentTask = job;
+ this.currentTask = task;
+ this.currentConfiguration = configuration;
// Create a new HandBrake instance
// Setup the HandBrake Instance
HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
- this.instance = HandBrakeInstanceManager.GetEncodeInstance(job.Configuration.Verbosity);
+ this.instance = HandBrakeInstanceManager.GetEncodeInstance(configuration.Verbosity);
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;
this.instance.EncodeProgress += this.InstanceEncodeProgress;
@@ -83,21 +73,21 @@ namespace HandBrake.ApplicationServices.Services.Encode }
this.IsEncoding = true;
- this.SetupLogging(job, true);
+ this.SetupLogging();
// Verify the Destination Path Exists, and if not, create it.
- this.VerifyEncodeDestinationPath(job);
+ this.VerifyEncodeDestinationPath(task);
ServiceLogMessage("Starting Encode ...");
// Get an EncodeJob object for the Interop Library
- instance.StartEncode(EncodeFactory.Create(job.Task, job.Configuration));
+ instance.StartEncode(EncodeFactory.Create(task, configuration));
// Fire the Encode Started Event
this.InvokeEncodeStarted(System.EventArgs.Empty);
// Set the Process Priority
- switch (job.Configuration.ProcessPriority)
+ switch (configuration.ProcessPriority)
{
case "Realtime":
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
@@ -124,7 +114,7 @@ namespace HandBrake.ApplicationServices.Services.Encode this.IsEncoding = false;
ServiceLogMessage("Failed to start encoding ..." + Environment.NewLine + exc);
- this.InvokeEncodeCompleted(new EventArgs.EncodeCompletedEventArgs(false, exc, "Unable to start encoding", job.Task.Source));
+ this.InvokeEncodeCompleted(new EventArgs.EncodeCompletedEventArgs(false, exc, "Unable to start encoding", task.Source));
}
}
@@ -254,7 +244,7 @@ namespace HandBrake.ApplicationServices.Services.Encode HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;
// Handling Log Data
- this.ProcessLogs(this.currentTask.Task.Destination, this.currentTask.Configuration);
+ this.ProcessLogs(this.currentTask.Destination, this.currentConfiguration);
// Cleanup
this.ShutdownFileWriter();
@@ -262,8 +252,8 @@ namespace HandBrake.ApplicationServices.Services.Encode // Raise the Encode Completed EVent.
this.InvokeEncodeCompleted(
e.Error
- ? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)
- : new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));
+ ? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Destination)
+ : new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Destination));
}
#endregion
}
diff --git a/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs b/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs index 3fa93fe7e..03155d0b5 100644 --- a/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs +++ b/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs @@ -13,6 +13,8 @@ namespace HandBrakeWPF.EventArgs using HandBrake.ApplicationServices.Model;
+ using HandBrakeWPF.Services.Queue.Model;
+
/// <summary>
/// Queue Progress Event Args
/// </summary>
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index f8e754663..e0d3979e2 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -154,7 +154,7 @@ <Compile Include="Model\Subtitles\SubtitleBurnInBehaviourModes.cs" />
<Compile Include="Model\Subtitles\SubtitleBehaviourModes.cs" />
<Compile Include="Model\Subtitles\SubtitleBehaviours.cs" />
- <Compile Include="Services\Interfaces\IQueueProcessor.cs" />
+ <Compile Include="Services\Queue\Interfaces\IQueueProcessor.cs" />
<Compile Include="Services\Presets\Factories\PlistPresetFactory.cs" />
<Compile Include="Helpers\FileHelper.cs" />
<Compile Include="Services\Presets\Model\Preset.cs" />
@@ -164,7 +164,10 @@ <Compile Include="Services\Interfaces\IUserSettingService.cs" />
<Compile Include="Services\Presets\Model\PresetContainer.cs" />
<Compile Include="Services\Presets\PresetService.cs" />
- <Compile Include="Services\QueueProcessor.cs" />
+ <Compile Include="Services\Queue\Model\QueueTaskContainer.cs" />
+ <Compile Include="Services\Queue\QueueProcessor.cs" />
+ <Compile Include="Services\Queue\Model\QueueItemStatus.cs" />
+ <Compile Include="Services\Queue\Model\QueueTask.cs" />
<Compile Include="Services\UserSettingService.cs" />
<Compile Include="Utilities\AppcastReader.cs" />
<Compile Include="Utilities\DelayedActionProcessor.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index e73251b07..d2d9f1322 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -22,8 +22,9 @@ namespace HandBrakeWPF.Helpers using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Queue.Model;
- using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;
+ using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
/// <summary>
/// Queue Recovery Helper
diff --git a/win/CS/HandBrakeWPF/Services/NotificationService.cs b/win/CS/HandBrakeWPF/Services/NotificationService.cs index d85a63d42..33870fe14 100644 --- a/win/CS/HandBrakeWPF/Services/NotificationService.cs +++ b/win/CS/HandBrakeWPF/Services/NotificationService.cs @@ -14,7 +14,7 @@ namespace HandBrakeWPF.Services using HandBrakeWPF.Services.Interfaces;
- using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;
+ using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
/// <summary>
/// The Notification Service (Growl Connector)
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs index 5bb8ca0ad..45889207f 100644 --- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs +++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs @@ -20,6 +20,7 @@ namespace HandBrakeWPF.Services using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Queue.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
using Execute = Caliburn.Micro.Execute;
diff --git a/win/CS/HandBrakeWPF/Services/Interfaces/IQueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs index b04c825d9..aaeb37708 100644 --- a/win/CS/HandBrakeWPF/Services/Interfaces/IQueueProcessor.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs @@ -7,14 +7,15 @@ // </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrakeWPF.Services.Interfaces
+namespace HandBrakeWPF.Services.Queue.Interfaces
{
using System;
using System.ComponentModel;
- using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
+ using HandBrakeWPF.Services.Queue.Model;
+
/// <summary>
/// The Queue Processor
/// </summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueItemStatus.cs index c60945abd..c60945abd 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueItemStatus.cs diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs index 42f55d02d..f11cb9b8d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs @@ -7,9 +7,9 @@ // </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrake.ApplicationServices.Model
+namespace HandBrakeWPF.Services.Queue.Model
{
-
+ using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Utilities;
@@ -131,7 +131,7 @@ namespace HandBrake.ApplicationServices.Model return false;
}
- return Equals((QueueTask)obj);
+ return this.Equals((QueueTask)obj);
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs new file mode 100644 index 000000000..0509cd088 --- /dev/null +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs @@ -0,0 +1,42 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueTaskContainer.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The queue task container.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Services.Queue.Model
+{
+ /// <summary>
+ /// The queue task container.
+ /// </summary>
+ public class QueueTaskContainer
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueueTaskContainer"/> class.
+ /// </summary>
+ /// <param name="version">
+ /// The version.
+ /// </param>
+ /// <param name="queuetask">
+ /// The queuetask.
+ /// </param>
+ public QueueTaskContainer(int version, string queuetask)
+ {
+ Version = version;
+ QueueTask = queuetask;
+ }
+
+ /// <summary>
+ /// Gets or sets the version of the presets stored in this container.
+ /// </summary>
+ public int Version { get; set; }
+
+ /// <summary>
+ /// Gets or sets the presets. This is a serialised string.
+ /// </summary>
+ public string QueueTask { get; set; }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Services/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs index 0507f7307..797d74e08 100644 --- a/win/CS/HandBrakeWPF/Services/QueueProcessor.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs @@ -7,7 +7,7 @@ // </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrakeWPF.Services
+namespace HandBrakeWPF.Services.Queue
{
using System;
using System.Collections.Generic;
@@ -16,23 +16,23 @@ namespace HandBrakeWPF.Services using System.Linq;
using System.Xml.Serialization;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Services.Queue.Model;
+
using Execute = Caliburn.Micro.Execute;
- using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;
+ using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
using QueueCompletedEventArgs = HandBrakeWPF.EventArgs.QueueCompletedEventArgs;
using QueueProgressEventArgs = HandBrakeWPF.EventArgs.QueueProgressEventArgs;
/// <summary>
/// The HandBrake Queue
/// </summary>
- public class QueueProcessor : IQueueProcessor
+ public class QueueProcessor : Interfaces.IQueueProcessor
{
#region Constants and Fields
@@ -588,7 +588,7 @@ namespace HandBrakeWPF.Services if (job != null)
{
this.InvokeJobProcessingStarted(new QueueProgressEventArgs(job));
- this.EncodeService.Start(job);
+ this.EncodeService.Start(job.Task, job.Configuration);
}
else
{
diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs index e51dc1707..0fd29950e 100644 --- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -36,6 +36,8 @@ namespace HandBrakeWPF.Startup using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Queue;
+ using HandBrakeWPF.Services.Queue.Interfaces;
/// <summary>
/// The Castle Bootstrapper
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 4c9921459..2ba9744f6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -44,6 +44,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Services.Presets.Factories;
using HandBrakeWPF.Services.Presets.Interfaces;
using HandBrakeWPF.Services.Presets.Model;
+ using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
using HandBrakeWPF.Views;
@@ -53,7 +54,7 @@ namespace HandBrakeWPF.ViewModels using Ookii.Dialogs.Wpf;
using Execute = Caliburn.Micro.Execute;
- using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;
+ using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
/// <summary>
/// HandBrakes Main Window
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 7191ad9b5..52c51419b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -22,6 +22,8 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Queue.Interfaces;
+ using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.ViewModels.Interfaces;
using Microsoft.Win32;
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index 4d505b83d..11a9d8715 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -18,7 +18,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
- using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;
+ using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
/// <summary>
/// The Shell View Model
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index 3a3b4e6eb..7e6cc2525 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -33,6 +33,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Properties;
using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -638,7 +639,7 @@ namespace HandBrakeWPF.ViewModels this.encodeService.EncodeCompleted += this.encodeService_EncodeCompleted;
this.encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;
- this.encodeService.Start((QueueTask)state);
+ this.encodeService.Start(((QueueTask)state).Task, ((QueueTask)state).Configuration);
this.userSettingService.SetUserSetting(UserSettingConstants.LastPreviewDuration, this.Duration);
}
#endregion
|