summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-09-25 15:23:17 +0000
committersr55 <[email protected]>2012-09-25 15:23:17 +0000
commit83af0dca6f4ecc16d5a4dcc6b6ccd97b707f7156 (patch)
tree5deeb98145f9fccd54ccf05007a06702e9197271 /win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
parentc9c4474cc265ea02f25fc5e94b161705402ab807 (diff)
WinGui: LibHb Encode and Scan support (off by default for the moment until I have time to test this and tidy up some of the code) Can be turned on in preferences.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4980 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index 404a47fac..5c3deb80f 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -12,6 +12,7 @@ namespace HandBrake.ApplicationServices.Services
using System;
using System.Diagnostics;
+ using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Base;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -163,7 +164,7 @@ namespace HandBrake.ApplicationServices.Services
}
catch (Exception exc)
{
- this.Invoke_encodeCompleted(new EncodeCompletedEventArgs(false, exc, "An Error has occured in EncodeService.Run()"));
+ this.Invoke_encodeCompleted(new EncodeCompletedEventArgs(false, exc, "An Error has occured."));
}
}
@@ -184,7 +185,15 @@ namespace HandBrake.ApplicationServices.Services
/// </param>
public override void Stop(Exception exc)
{
- this.instance.StopEncode();
+ try
+ {
+ this.IsEncoding = false;
+ this.instance.StopEncode();
+ }
+ catch(Exception)
+ {
+ // Do Nothing.
+ }
this.Invoke_encodeCompleted(
exc == null
@@ -202,6 +211,14 @@ namespace HandBrake.ApplicationServices.Services
throw new NotImplementedException("This Method is not used in the LibEncode service. You should use the Stop() method instead! ");
}
+ /// <summary>
+ /// Shutdown the service.
+ /// </summary>
+ public void Shutdown()
+ {
+ // Nothing to do for this implementation.
+ }
+
#region HandBrakeInstance Event Handlers.
/// <summary>
/// Log a message