summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Encode
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-24 16:27:24 +0000
committersr55 <[email protected]>2015-01-24 16:27:24 +0000
commitffc93adeaa23923c1c8b401e45cf4b155e4e99eb (patch)
tree0b6e6c014b6486048bbad453884b1978fd77ed0c /win/CS/HandBrake.ApplicationServices/Services/Encode
parent2739ba3806abcb12157a689d4c2eb258992bcb39 (diff)
WinGui: Handle the Logging events a bit better. This will stop some of the cross scan/encode log pollution that's been occurring since libhb encode was enabled. Will need to look into a better solution as scans during an encode will still appear in the encode log and vice versa while a scan is ongoing.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6809 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs
index 0ed17fb51..942644f2e 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs
@@ -62,8 +62,6 @@ namespace HandBrake.ApplicationServices.Services.Encode
/// </summary>
public LibEncode()
{
- HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
- HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
}
/// <summary>
@@ -96,6 +94,8 @@ namespace HandBrake.ApplicationServices.Services.Encode
// Create a new HandBrake instance
// Setup the HandBrake Instance
+ HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
+ HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
this.instance = HandBrakeInstanceManager.GetEncodeInstance(job.Configuration.Verbosity);
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;
this.instance.EncodeProgress += this.InstanceEncodeProgress;
@@ -348,6 +348,9 @@ namespace HandBrake.ApplicationServices.Services.Encode
? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)
: new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));
+ HandBrakeUtils.MessageLogged -= this.HandBrakeInstanceMessageLogged;
+ HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;
+
this.ShutdownFileWriter();
}
#endregion