]> granicus.if.org Git - handbrake/commitdiff
WinGui: Some further refactoring of the services library. Moving all the queueing...
authorsr55 <sr55.hb@outlook.com>
Sun, 12 Apr 2015 14:25:56 +0000 (14:25 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 12 Apr 2015 14:25:56 +0000 (14:25 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7086 b64f7644-9d1e-0410-96f1-a4d463321fa5

19 files changed:
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs
win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncode.cs
win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs
win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
win/CS/HandBrakeWPF/Services/NotificationService.cs
win/CS/HandBrakeWPF/Services/PrePostActionService.cs
win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs [moved from win/CS/HandBrakeWPF/Services/Interfaces/IQueueProcessor.cs with 95% similarity]
win/CS/HandBrakeWPF/Services/Queue/Model/QueueItemStatus.cs [moved from win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs with 100% similarity]
win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs [moved from win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs with 93% similarity]
win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs [moved from win/CS/HandBrakeWPF/Services/QueueProcessor.cs with 95% similarity]
win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs

index a8bb2a0634cd2623a00defd2a98431cf94cd9dc4..c3995689cf5d314404b937bdb53e3bfb60d23f83 100644 (file)
     <Compile Include="Services\Encode\Model\EncodeTask.cs" />\r
     <Compile Include="Services\Encode\Model\Models\OutputFormat.cs" />\r
     <Compile Include="Services\Encode\Model\Models\SubtitleTrack.cs" />\r
-    <Compile Include="Model\QueueItemStatus.cs" />\r
-    <Compile Include="Model\QueueTask.cs" />\r
     <Compile Include="Services\Encode\Model\Models\SubtitleType.cs" />\r
     <Compile Include="Services\Scan\Model\Audio.cs" />\r
     <Compile Include="Services\Scan\Model\Chapter.cs" />\r
index 3ba8a847f48315d694eb7665d5d2da1a4847a11d..227a73f5e60a4cfbe2023fee6b6e1f80b7925a32 100644 (file)
@@ -11,15 +11,14 @@ namespace HandBrake.ApplicationServices.Services.Encode
 {\r
     using System;\r
     using System.Diagnostics;\r
-    using System.Globalization;\r
     using System.IO;\r
     using System.Text;\r
-    using System.Text.RegularExpressions;\r
 \r
     using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
+    using HandBrake.ApplicationServices.Services.Encode.Model;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
     /// <summary>\r
@@ -237,13 +236,7 @@ namespace HandBrake.ApplicationServices.Services.Encode
         /// <summary>\r
         /// Setup the logging.\r
         /// </summary>\r
-        /// <param name="encodeQueueTask">\r
-        /// The encode QueueTask.\r
-        /// </param>\r
-        /// <param name="isLibhb">\r
-        /// Indicates if this is libhb that is encoding or not.\r
-        /// </param>\r
-        protected void SetupLogging(QueueTask encodeQueueTask, bool isLibhb)\r
+        protected void SetupLogging()\r
         {\r
             this.ShutdownFileWriter();\r
             string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
@@ -369,12 +362,12 @@ namespace HandBrake.ApplicationServices.Services.Encode
         /// <exception cref="Exception">\r
         /// If the creation fails, an exception is thrown.\r
         /// </exception>\r
-        protected void VerifyEncodeDestinationPath(QueueTask task)\r
+        protected void VerifyEncodeDestinationPath(EncodeTask task)\r
         {\r
             // Make sure the path exists, attempt to create it if it doesn't\r
             try\r
             {\r
-                string path = Directory.GetParent(task.Task.Destination).ToString();\r
+                string path = Directory.GetParent(task.Destination).ToString();\r
                 if (!Directory.Exists(path))\r
                 {\r
                     Directory.CreateDirectory(path);\r
index e0685d4ad947bd27123812270361eb677007c655..60a5744adb89dfc1e44bd401d11935918183e2ac 100644 (file)
@@ -13,6 +13,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Interfaces
 \r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
+    using HandBrake.ApplicationServices.Services.Encode.Model;\r
 \r
     /// <summary>\r
     /// Encode Progess Status\r
@@ -82,7 +83,10 @@ namespace HandBrake.ApplicationServices.Services.Encode.Interfaces
         /// <param name="job">\r
         /// The job.\r
         /// </param>\r
-        void Start(QueueTask job);\r
+        /// <param name="configuration">\r
+        /// The configuration.\r
+        /// </param>\r
+        void Start(EncodeTask job, HBConfiguration configuration);\r
 \r
         /// <summary>\r
         /// The pause.\r
index 0ae99b9648e02185b868d27764ec7c04579d5b99..3c92f9a6f82171f20f2e62fb07b473e78bb15894 100644 (file)
@@ -15,10 +15,10 @@ namespace HandBrake.ApplicationServices.Services.Encode
     using HandBrake.ApplicationServices.Interop;\r
     using HandBrake.ApplicationServices.Interop.EventArgs;\r
     using HandBrake.ApplicationServices.Interop.Interfaces;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.Factories;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
+    using HandBrake.ApplicationServices.Services.Encode.Model;\r
 \r
     /// <summary>\r
     /// LibHB Implementation of IEncode\r
@@ -27,25 +27,11 @@ namespace HandBrake.ApplicationServices.Services.Encode
     {\r
         #region Private Variables\r
 \r
-        /// <summary>\r
-        /// Lock for the log file\r
-        /// </summary>\r
         private static readonly object LogLock = new object();\r
-\r
-        /// <summary>\r
-        /// The instance.\r
-        /// </summary>\r
         private IHandBrakeInstance instance;\r
-\r
-        /// <summary>\r
-        /// The Start time of the current Encode;\r
-        /// </summary>\r
         private DateTime startTime;\r
-\r
-        /// <summary>\r
-        /// The Current Task\r
-        /// </summary>\r
-        private QueueTask currentTask;\r
+        private EncodeTask currentTask;\r
+        private HBConfiguration currentConfiguration;\r
 \r
         #endregion\r
 \r
@@ -57,22 +43,26 @@ namespace HandBrake.ApplicationServices.Services.Encode
         /// <summary>\r
         /// Start with a LibHb EncodeJob Object\r
         /// </summary>\r
-        /// <param name="job">\r
-        /// The job.\r
+        /// <param name="task">\r
+        /// The task.\r
+        /// </param>\r
+        /// <param name="configuration">\r
+        /// The configuration.\r
         /// </param>\r
-        public void Start(QueueTask job)\r
+        public void Start(EncodeTask task, HBConfiguration configuration)\r
         {\r
             try\r
             {\r
                 // Setup\r
                 this.startTime = DateTime.Now;\r
-                this.currentTask = job;\r
+                this.currentTask = task;\r
+                this.currentConfiguration = configuration;\r
 \r
                 // Create a new HandBrake instance\r
                 // Setup the HandBrake Instance\r
                 HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
                 HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
-                this.instance = HandBrakeInstanceManager.GetEncodeInstance(job.Configuration.Verbosity);\r
+                this.instance = HandBrakeInstanceManager.GetEncodeInstance(configuration.Verbosity);\r
                 this.instance.EncodeCompleted += this.InstanceEncodeCompleted;\r
                 this.instance.EncodeProgress += this.InstanceEncodeProgress;\r
 \r
@@ -83,21 +73,21 @@ namespace HandBrake.ApplicationServices.Services.Encode
                 }\r
      \r
                 this.IsEncoding = true;\r
-                this.SetupLogging(job, true);\r
+                this.SetupLogging();\r
 \r
                 // Verify the Destination Path Exists, and if not, create it.\r
-                this.VerifyEncodeDestinationPath(job);\r
+                this.VerifyEncodeDestinationPath(task);\r
 \r
                 ServiceLogMessage("Starting Encode ...");\r
 \r
                 // Get an EncodeJob object for the Interop Library\r
-                instance.StartEncode(EncodeFactory.Create(job.Task, job.Configuration));\r
+                instance.StartEncode(EncodeFactory.Create(task, configuration));\r
 \r
                 // Fire the Encode Started Event\r
                 this.InvokeEncodeStarted(System.EventArgs.Empty);\r
 \r
                 // Set the Process Priority\r
-                switch (job.Configuration.ProcessPriority)\r
+                switch (configuration.ProcessPriority)\r
                 {\r
                     case "Realtime":\r
                         Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;\r
@@ -124,7 +114,7 @@ namespace HandBrake.ApplicationServices.Services.Encode
                 this.IsEncoding = false;\r
 \r
                 ServiceLogMessage("Failed to start encoding ..." + Environment.NewLine + exc);\r
-                this.InvokeEncodeCompleted(new EventArgs.EncodeCompletedEventArgs(false, exc, "Unable to start encoding", job.Task.Source));\r
+                this.InvokeEncodeCompleted(new EventArgs.EncodeCompletedEventArgs(false, exc, "Unable to start encoding", task.Source));\r
             }\r
         }\r
 \r
@@ -254,7 +244,7 @@ namespace HandBrake.ApplicationServices.Services.Encode
             HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;\r
             \r
             // Handling Log Data \r
-            this.ProcessLogs(this.currentTask.Task.Destination, this.currentTask.Configuration);\r
+            this.ProcessLogs(this.currentTask.Destination, this.currentConfiguration);\r
 \r
             // Cleanup\r
             this.ShutdownFileWriter();\r
@@ -262,8 +252,8 @@ namespace HandBrake.ApplicationServices.Services.Encode
             // Raise the Encode Completed EVent.\r
             this.InvokeEncodeCompleted(\r
                 e.Error\r
-                    ? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)\r
-                    : new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));\r
+                    ? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Destination)\r
+                    : new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Destination));\r
         }\r
         #endregion\r
     }\r
index 3fa93fe7e0a1ca918a962f9802d711890c0e12ac..03155d0b5c886e40a81a99f5885024b4a8e31e57 100644 (file)
@@ -13,6 +13,8 @@ namespace HandBrakeWPF.EventArgs
 \r
     using HandBrake.ApplicationServices.Model;\r
 \r
+    using HandBrakeWPF.Services.Queue.Model;\r
+\r
     /// <summary>\r
     /// Queue Progress Event Args\r
     /// </summary>\r
index f8e7546636cd927af7c4638363af71f069fed680..e0d3979e26715535882f812963a86ade5d33faec 100644 (file)
     <Compile Include="Model\Subtitles\SubtitleBurnInBehaviourModes.cs" />\r
     <Compile Include="Model\Subtitles\SubtitleBehaviourModes.cs" />\r
     <Compile Include="Model\Subtitles\SubtitleBehaviours.cs" />\r
-    <Compile Include="Services\Interfaces\IQueueProcessor.cs" />\r
+    <Compile Include="Services\Queue\Interfaces\IQueueProcessor.cs" />\r
     <Compile Include="Services\Presets\Factories\PlistPresetFactory.cs" />\r
     <Compile Include="Helpers\FileHelper.cs" />\r
     <Compile Include="Services\Presets\Model\Preset.cs" />\r
     <Compile Include="Services\Interfaces\IUserSettingService.cs" />\r
     <Compile Include="Services\Presets\Model\PresetContainer.cs" />\r
     <Compile Include="Services\Presets\PresetService.cs" />\r
-    <Compile Include="Services\QueueProcessor.cs" />\r
+    <Compile Include="Services\Queue\Model\QueueTaskContainer.cs" />\r
+    <Compile Include="Services\Queue\QueueProcessor.cs" />\r
+    <Compile Include="Services\Queue\Model\QueueItemStatus.cs" />\r
+    <Compile Include="Services\Queue\Model\QueueTask.cs" />\r
     <Compile Include="Services\UserSettingService.cs" />\r
     <Compile Include="Utilities\AppcastReader.cs" />\r
     <Compile Include="Utilities\DelayedActionProcessor.cs" />\r
index e73251b07241da775937413d7ce50ccd8e49e95d..d2d9f13223828baeb1e20cb5d04d8f28823bf668 100644 (file)
@@ -22,8 +22,9 @@ namespace HandBrakeWPF.Helpers
     using HandBrake.ApplicationServices.Utilities;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
+    using HandBrakeWPF.Services.Queue.Model;\r
 \r
-    using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
 \r
     /// <summary>\r
     /// Queue Recovery Helper\r
index d85a63d42c3015f8e484d1df4a657b03526f1bea..33870fe149183d59ec49a09e8eaf0ab571111b18 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Services
 \r
     using HandBrakeWPF.Services.Interfaces;\r
 \r
-    using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
 \r
     /// <summary>\r
     /// The Notification Service (Growl Connector)\r
index 5bb8ca0ad8fb6b9e452ef03862add385019f7bdb..45889207fd14637511d0264b2f255d5a47afc5f4 100644 (file)
@@ -20,6 +20,7 @@ namespace HandBrakeWPF.Services
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Services.Interfaces;\r
+    using HandBrakeWPF.Services.Queue.Interfaces;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     using Execute = Caliburn.Micro.Execute;\r
similarity index 95%
rename from win/CS/HandBrakeWPF/Services/Interfaces/IQueueProcessor.cs
rename to win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs
index b04c825d916eb77c2a27a5aec323b572c840d73a..aaeb37708051acdfc937ad538dcd4ad9ad6d3962 100644 (file)
@@ -7,14 +7,15 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrakeWPF.Services.Interfaces\r
+namespace HandBrakeWPF.Services.Queue.Interfaces\r
 {\r
     using System;\r
     using System.ComponentModel;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
 \r
+    using HandBrakeWPF.Services.Queue.Model;\r
+\r
     /// <summary>\r
     /// The Queue Processor\r
     /// </summary>\r
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
rename to win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
index 42f55d02dea0ef6ccb95ceb6f850bae661d1b66f..f11cb9b8d28f008eabce96e33d9887c8d1c82792 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Model\r
+namespace HandBrakeWPF.Services.Queue.Model\r
 {\r
-\r
+    using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.Model;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
@@ -131,7 +131,7 @@ namespace HandBrake.ApplicationServices.Model
                 return false;\r
             }\r
 \r
-            return Equals((QueueTask)obj);\r
+            return this.Equals((QueueTask)obj);\r
         }\r
 \r
         /// <summary>\r
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTaskContainer.cs
new file mode 100644 (file)
index 0000000..0509cd0
--- /dev/null
@@ -0,0 +1,42 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="QueueTaskContainer.cs" company="HandBrake Project (http://handbrake.fr)">\r
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
+// </copyright>\r
+// <summary>\r
+//   The queue task container.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Services.Queue.Model\r
+{\r
+    /// <summary>\r
+    /// The queue task container.\r
+    /// </summary>\r
+    public class QueueTaskContainer\r
+    {\r
+          /// <summary>\r
+          /// Initializes a new instance of the <see cref="QueueTaskContainer"/> class.\r
+          /// </summary>\r
+          /// <param name="version">\r
+          /// The version.\r
+          /// </param>\r
+          /// <param name="queuetask">\r
+          /// The queuetask.\r
+          /// </param>\r
+        public QueueTaskContainer(int version, string queuetask)\r
+        {\r
+            Version = version;\r
+            QueueTask = queuetask;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the version of the presets stored in this container.\r
+        /// </summary>\r
+        public int Version { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the presets. This is a serialised string.\r
+        /// </summary>\r
+        public string QueueTask { get; set;  }\r
+    }\r
+}\r
similarity index 95%
rename from win/CS/HandBrakeWPF/Services/QueueProcessor.cs
rename to win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
index 0507f73074bdd6cfdc55314f6202ff7d843080f5..797d74e0863b918ba5e282e2ff514090bca955c3 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrakeWPF.Services\r
+namespace HandBrakeWPF.Services.Queue\r
 {\r
     using System;\r
     using System.Collections.Generic;\r
@@ -16,23 +16,23 @@ namespace HandBrakeWPF.Services
     using System.Linq;\r
     using System.Xml.Serialization;\r
 \r
-    using Caliburn.Micro;\r
-\r
     using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
+    using HandBrakeWPF.Services.Queue.Model;\r
+\r
     using Execute = Caliburn.Micro.Execute;\r
-    using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
     using QueueCompletedEventArgs = HandBrakeWPF.EventArgs.QueueCompletedEventArgs;\r
     using QueueProgressEventArgs = HandBrakeWPF.EventArgs.QueueProgressEventArgs;\r
 \r
     /// <summary>\r
     /// The HandBrake Queue\r
     /// </summary>\r
-    public class QueueProcessor : IQueueProcessor\r
+    public class QueueProcessor : Interfaces.IQueueProcessor\r
     {\r
         #region Constants and Fields\r
 \r
@@ -588,7 +588,7 @@ namespace HandBrakeWPF.Services
             if (job != null)\r
             {\r
                 this.InvokeJobProcessingStarted(new QueueProgressEventArgs(job));\r
-                this.EncodeService.Start(job);\r
+                this.EncodeService.Start(job.Task, job.Configuration);\r
             }\r
             else\r
             {\r
index e51dc1707c8ead674aec5fb21dd7a2e6e99d7bb6..0fd29950e35ce0167b427608ad2454201c5d6a95 100644 (file)
@@ -36,6 +36,8 @@ namespace HandBrakeWPF.Startup
 \r
     using HandBrakeWPF.Services;\r
     using HandBrakeWPF.Services.Interfaces;\r
+    using HandBrakeWPF.Services.Queue;\r
+    using HandBrakeWPF.Services.Queue.Interfaces;\r
 \r
     /// <summary>\r
     /// The Castle Bootstrapper\r
index 4c99214591d07ea955a7b355da1eada294a7edab..2ba9744f6273dd4807d622de4e6b7c92ec135fa7 100644 (file)
@@ -44,6 +44,7 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Services.Presets.Factories;\r
     using HandBrakeWPF.Services.Presets.Interfaces;\r
     using HandBrakeWPF.Services.Presets.Model;\r
+    using HandBrakeWPF.Services.Queue.Model;\r
     using HandBrakeWPF.Utilities;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
     using HandBrakeWPF.Views;\r
@@ -53,7 +54,7 @@ namespace HandBrakeWPF.ViewModels
     using Ookii.Dialogs.Wpf;\r
 \r
     using Execute = Caliburn.Micro.Execute;\r
-    using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
 \r
     /// <summary>\r
     /// HandBrakes Main Window\r
index 7191ad9b517f185eb32ce667c7deff314d583b4a..52c51419b14df5b65702496fb9f4334661d82532 100644 (file)
@@ -22,6 +22,8 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Properties;\r
     using HandBrakeWPF.Services.Interfaces;\r
+    using HandBrakeWPF.Services.Queue.Interfaces;\r
+    using HandBrakeWPF.Services.Queue.Model;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     using Microsoft.Win32;\r
index 4d505b83d32ebfe10894057931ec7316a6776458..11a9d8715739a049329bfbdedebeea6d55f86379 100644 (file)
@@ -18,7 +18,7 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
-    using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
 \r
     /// <summary>\r
     /// The Shell View Model\r
index 3a3b4e6eb775694c380b28b91e1a3723aef29b13..7e6cc252538ed7d86ab257fa2da17a4be65ca01a 100644 (file)
@@ -33,6 +33,7 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Properties;\r
     using HandBrakeWPF.Services;\r
     using HandBrakeWPF.Services.Interfaces;\r
+    using HandBrakeWPF.Services.Queue.Model;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     /// <summary>\r
@@ -638,7 +639,7 @@ namespace HandBrakeWPF.ViewModels
             this.encodeService.EncodeCompleted += this.encodeService_EncodeCompleted;\r
             this.encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;\r
 \r
-            this.encodeService.Start((QueueTask)state);\r
+            this.encodeService.Start(((QueueTask)state).Task, ((QueueTask)state).Configuration);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.LastPreviewDuration, this.Duration);\r
         }\r
         #endregion\r