diff options
author | sr55 <[email protected]> | 2014-05-14 19:48:54 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-05-14 19:48:54 +0000 |
commit | 37848c2b97eda7b116a79d1b520377bd4978e6ba (patch) | |
tree | eb4938c6d839ce87b20a5acf60e02fdf2b13be70 /win/CS/HandBrake.ApplicationServices | |
parent | ebb2651ca57744741810e870e3762f1ada2959e6 (diff) |
WinGui: Fix up Pausing when using libhb encode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6189 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
5 files changed, 27 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs b/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs index 32dc494d7..f5aba636c 100644 --- a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs +++ b/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs @@ -104,6 +104,11 @@ namespace HandBrake.ApplicationServices.Isolation }
/// <summary>
+ /// Gets or sets IsPaused
+ /// </summary>
+ public bool IsPasued { get; private set; }
+
+ /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 42b066ee1..18d69c06f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -68,6 +68,11 @@ namespace HandBrake.ApplicationServices.Services }
}
+ /// <summary>
+ /// Gets or sets IsPaused
+ /// </summary>
+ public bool IsPasued { get; private set; }
+
#endregion
#region Public Methods
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs index 61c99eab0..7378eee1d 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs @@ -77,6 +77,11 @@ namespace HandBrake.ApplicationServices.Services.Interfaces bool CanPause { get; }
/// <summary>
+ /// Is Paused
+ /// </summary>
+ bool IsPasued { get; }
+
+ /// <summary>
/// Start with a LibHb EncodeJob Object
/// </summary>
/// <param name="job">
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index 27e3b039d..608fd1476 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -79,6 +79,11 @@ namespace HandBrake.ApplicationServices.Services }
/// <summary>
+ /// Gets or sets IsPaused
+ /// </summary>
+ public bool IsPasued { get; private set; }
+
+ /// <summary>
/// Start with a LibHb EncodeJob Object
/// </summary>
/// <param name="job">
@@ -148,6 +153,7 @@ namespace HandBrake.ApplicationServices.Services if (this.instance != null)
{
this.instance.PauseEncode();
+ this.IsPasued = true;
}
}
@@ -159,6 +165,7 @@ namespace HandBrake.ApplicationServices.Services if (this.instance != null)
{
this.instance.ResumeEncode();
+ this.IsPasued = false;
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index fd08f6408..b5b8983ea 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -447,6 +447,11 @@ namespace HandBrake.ApplicationServices.Services this.EncodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted;
this.EncodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
+ if (this.EncodeService.CanPause && this.EncodeService.IsEncoding)
+ {
+ this.EncodeService.Resume();
+ }
+
if (!this.EncodeService.IsEncoding)
{
this.ProcessNextJob();
|