summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-05-08 21:26:35 +0100
committersr55 <[email protected]>2018-05-08 21:26:35 +0100
commit1a16ebead7e49a214276859f53ce18a0c844f102 (patch)
treeaf8bdfb94e31353c30d5eb0e0e30c4171e168e9a /win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
parentd04722a3e9002b6e988403b4743ce86b20b2533c (diff)
WinGui: Remove the need for ILog on the key Interop API surface.
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs16
1 files changed, 3 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
index d8f432fc4..f94c6fe24 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
@@ -48,8 +48,6 @@ namespace HandBrake.ApplicationServices.Interop
/// </summary>
private const double EncodePollIntervalMs = 250;
- private readonly ILog log = LogService.GetLogger();
-
/// <summary>
/// The native handle to the HandBrake instance.
/// </summary>
@@ -246,7 +244,7 @@ namespace HandBrake.ApplicationServices.Interop
catch (Exception exc)
{
Debug.WriteLine(exc);
- this.log.LogMessage(exc.ToString(), LogMessageType.API, LogLevel.Error);
+ HandBrakeUtils.SendErrorEvent(exc.ToString());
}
};
this.scanPollTimer.Start();
@@ -480,7 +478,6 @@ namespace HandBrake.ApplicationServices.Interop
{
IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
JsonState state = null;
if (!string.IsNullOrEmpty(statusJson))
{
@@ -502,14 +499,9 @@ namespace HandBrake.ApplicationServices.Interop
var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);
this.titlesJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);
- this.log.LogMessage(this.titlesJson, LogMessageType.Progress, LogLevel.Trace);
- if (string.IsNullOrEmpty(this.titlesJson))
- {
- this.log.LogMessage("Scan Error: No Scan Data Returned.", LogMessageType.API, LogLevel.Error);
- }
- else
- {
+ if (!string.IsNullOrEmpty(this.titlesJson))
+ {
this.titles = JsonConvert.DeserializeObject<JsonScanObject>(this.titlesJson);
if (this.titles != null)
{
@@ -533,8 +525,6 @@ namespace HandBrake.ApplicationServices.Interop
IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
-
JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);
TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;