summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-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
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs2
4 files changed, 58 insertions, 36 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();
diff --git a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
index 3d8e6c290..85c5a42b1 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
@@ -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;