]> granicus.if.org Git - handbrake/commitdiff
WinGui: Split out the encode portion of IHandBrakeInstance into IEncodeInstance....
authorsr55 <sr55.hb@outlook.com>
Sun, 10 Jun 2018 12:38:13 +0000 (13:38 +0100)
committersr55 <sr55.hb@outlook.com>
Sun, 10 Jun 2018 12:38:13 +0000 (13:38 +0100)
win/CS/HandBrake.Interop/HandBrake.Interop.csproj
win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs [new file with mode: 0644]
win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs

index 815a94be0a1edee8326406995d84802e10de447c..f7e9aa9b69c4702c22528fdfd63cd002a2793a05 100644 (file)
@@ -80,6 +80,7 @@
     <Compile Include="Interop\Helpers\InteropUtilities.cs" />
     <Compile Include="Interop\Helpers\NativeList.cs" />
     <Compile Include="Interop\Helpers\Utilities.cs" />
+    <Compile Include="Interop\Interfaces\IEncodeInstance.cs" />
     <Compile Include="Interop\Interfaces\IHandBrakeInstance.cs" />
     <Compile Include="Interop\Json\Anamorphic\AnamorphicGeometry.cs" />
     <Compile Include="Interop\Json\Anamorphic\DestSettings.cs" />
diff --git a/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs
new file mode 100644 (file)
index 0000000..68fd266
--- /dev/null
@@ -0,0 +1,52 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IEncodeInstance.cs" company="HandBrake Project (https://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>
+//   Defines the encode portions of the IHandBrakeInstance
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Interfaces
+{
+    using System;
+
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Interop.Json.Encode;
+
+    public interface IEncodeInstance
+    {
+        /// <summary>
+        /// Fires when an encode has completed.
+        /// </summary>
+        event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
+
+        /// <summary>
+        /// Fires for progress updates when encoding.
+        /// </summary>
+        event EventHandler<EncodeProgressEventArgs> EncodeProgress;
+
+        /// <summary>
+        /// Pauses the current encode.
+        /// </summary>
+        void PauseEncode();
+
+        /// <summary>
+        /// Resumes a paused encode.
+        /// </summary>
+        void ResumeEncode();
+
+        /// <summary>
+        /// Starts an encode with the given job.
+        /// </summary>
+        /// <param name="jobToStart">
+        /// The job to start.
+        /// </param>
+        void StartEncode(JsonEncodeObject jobToStart);
+
+        /// <summary>
+        /// Stops the current encode.
+        /// </summary>
+        void StopEncode();
+    }
+}
\ No newline at end of file
index 7714e5222b4acfce28a5d2baa28c6d939ace7b0d..b6d46c80c84885501dabebf93a107bcfbf073771 100644 (file)
@@ -12,27 +12,16 @@ namespace HandBrake.Interop.Interop.Interfaces
     using System;
 
     using HandBrake.Interop.Interop.EventArgs;
-    using HandBrake.Interop.Interop.Json.Encode;
     using HandBrake.Interop.Interop.Json.Scan;
     using HandBrake.Interop.Interop.Model.Preview;
 
     /// <summary>
     /// The Interface for HandBrakeInstance
     /// </summary>
-    public interface IHandBrakeInstance
+    public interface IHandBrakeInstance : IEncodeInstance
     {
         #region Events
 
-        /// <summary>
-        /// Fires when an encode has completed.
-        /// </summary>
-        event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
-
-        /// <summary>
-        /// Fires for progress updates when encoding.
-        /// </summary>
-        event EventHandler<EncodeProgressEventArgs> EncodeProgress;
-
         /// <summary>
         /// Fires when a scan has completed.
         /// </summary>
@@ -104,24 +93,6 @@ namespace HandBrake.Interop.Interop.Interfaces
         /// </returns>
         RawPreviewData GetPreview(PreviewSettings job, int previewNumber, bool deinterlace);
 
-        /// <summary>
-        /// Pauses the current encode.
-        /// </summary>
-        void PauseEncode();
-
-        /// <summary>
-        /// Resumes a paused encode.
-        /// </summary>
-        void ResumeEncode();
-
-        /// <summary>
-        /// Starts an encode with the given job.
-        /// </summary>
-        /// <param name="jobToStart">
-        /// The job to start.
-        /// </param>
-        void StartEncode(JsonEncodeObject jobToStart);
-
         /// <summary>
         /// Starts a scan of the given path.
         /// </summary>
@@ -134,13 +105,11 @@ namespace HandBrake.Interop.Interop.Interfaces
         /// <param name="minDuration">
         /// The min Duration.
         /// </param>
+        /// <param name="titleIndex">
+        /// The title Index.
+        /// </param>
         void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex);
 
-        /// <summary>
-        /// Stops the current encode.
-        /// </summary>
-        void StopEncode();
-
         /// <summary>
         /// Stop any running scans
         /// </summary>
index 3d8e6c2903c66d84aecaca568e2e326c078fc0b9..85c5a42b155994671cfdbd1c7683ee5506e4399d 100644 (file)
@@ -38,7 +38,7 @@ namespace HandBrakeWPF.Services.Encode
         #region Private Variables
 
         private ILog log = LogService.GetLogger();
-        private IHandBrakeInstance instance;
+        private IEncodeInstance instance;
         private DateTime startTime;
         private EncodeTask currentTask;
         private HBConfiguration currentConfiguration;