summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-17 19:39:49 +0000
committersr55 <[email protected]>2015-01-17 19:39:49 +0000
commit34db38d676420cf1fc827f339f5c894d5b798762 (patch)
tree79573157c83eef41f0d66bb824258994219b88c2 /win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs
parent5a74ccf9554940ae69e097b1abd6b1c5a556b4bc (diff)
WinGui:
- Numerous fixes to the JSON api code. Live preview should now work again. Possible fix for issue where queued jobs where stopping at a random point and not continuing. - Fix Clear button on the audio tab. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6760 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs
index 1ef749bd8..b1a889db0 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstanceManager.cs
@@ -20,6 +20,7 @@ namespace HandBrake.Interop
public static class HandBrakeInstanceManager
{
private static HandBrakeInstance scanInstance;
+ private static HandBrakeInstance encodeInstance;
/// <summary>
/// Gets the scanInstance.
@@ -46,6 +47,30 @@ namespace HandBrake.Interop
}
/// <summary>
+ /// The get encode instance.
+ /// </summary>
+ /// <param name="verbosity">
+ /// The verbosity.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IHandBrakeInstance"/>.
+ /// </returns>
+ public static IHandBrakeInstance GetEncodeInstance(int verbosity)
+ {
+ if (encodeInstance != null)
+ {
+ encodeInstance.Dispose();
+ encodeInstance = null;
+ }
+
+ HandBrakeInstance newInstance = new HandBrakeInstance();
+ newInstance.Initialize(verbosity);
+ encodeInstance = newInstance;
+
+ return encodeInstance;
+ }
+
+ /// <summary>
/// Gets the last scan scan instance.
/// </summary>
public static IHandBrakeInstance LastScanScanInstance
@@ -66,5 +91,27 @@ namespace HandBrake.Interop
return scanInstance.Handle;
}
}
+
+ /// <summary>
+ /// Gets the last encode scan instance.
+ /// </summary>
+ public static IHandBrakeInstance LastEncodeScanInstance
+ {
+ get
+ {
+ return encodeInstance;
+ }
+ }
+
+ /// <summary>
+ /// Gets the encode handle.
+ /// </summary>
+ internal static IntPtr LastEncodeHandle
+ {
+ get
+ {
+ return encodeInstance.Handle;
+ }
+ }
}
}