diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs index a74513f4a..5ceb70bdc 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs @@ -21,6 +21,7 @@ namespace HandBrake.ApplicationServices.Interop {
private static HandBrakeInstance scanInstance;
private static HandBrakeInstance encodeInstance;
+ private static HandBrakeInstance previewInstance;
private static HandBrakeInstance masterInstance;
/// <summary>
@@ -89,6 +90,30 @@ namespace HandBrake.ApplicationServices.Interop }
/// <summary>
+ /// The get encode instance.
+ /// </summary>
+ /// <param name="verbosity">
+ /// The verbosity.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IHandBrakeInstance"/>.
+ /// </returns>
+ public static IHandBrakeInstance GetPreviewInstance(int verbosity)
+ {
+ if (previewInstance != null)
+ {
+ previewInstance.Dispose();
+ previewInstance = null;
+ }
+
+ HandBrakeInstance newInstance = new HandBrakeInstance();
+ newInstance.Initialize(verbosity);
+ previewInstance = newInstance;
+
+ return previewInstance;
+ }
+
+ /// <summary>
/// Gets the master instance.
/// </summary>
internal static IHandBrakeInstance MasterInstance
|