summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-06-10 13:38:13 +0100
committersr55 <[email protected]>2018-06-10 13:38:13 +0100
commitf40358afcf1cd4f3aa3301389b86db191c5cee2e (patch)
treebd9fd76520e843f12f8fad7f5bf146bb9a7b69ae /win/CS/HandBrake.Interop
parent4a6a1bf9702977b1ea89a516c02bef64fb1b6e98 (diff)
WinGui: Split out the encode portion of IHandBrakeInstance into IEncodeInstance. API remains compatible.
Diffstat (limited to 'win/CS/HandBrake.Interop')
-rw-r--r--win/CS/HandBrake.Interop/HandBrake.Interop.csproj1
-rw-r--r--win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs52
-rw-r--r--win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs39
3 files changed, 57 insertions, 35 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
index 815a94be0..f7e9aa9b6 100644
--- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
+++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
@@ -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
index 000000000..68fd266f0
--- /dev/null
+++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs
@@ -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
diff --git a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
index 7714e5222..b6d46c80c 100644
--- a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
@@ -12,28 +12,17 @@ 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>
event EventHandler<EventArgs> ScanCompleted;
@@ -105,24 +94,6 @@ namespace HandBrake.Interop.Interop.Interfaces
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>
/// <param name="path">
@@ -134,14 +105,12 @@ 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>
void StopScan();