summaryrefslogtreecommitdiffstats
path: root/win/C#/EncodeQueue
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-01-21 20:47:15 +0000
committersr55 <[email protected]>2010-01-21 20:47:15 +0000
commit9ae5e6d54d2254ae9dbb08d56f2f55b5a2d3f6cd (patch)
tree39589a70ff421dca7af0348f8c81e4eab42a7a39 /win/C#/EncodeQueue
parent56fef9aafba02e1f6bac8724aeda00f78b77c712 (diff)
WinGui:
- Some code refactoring. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3081 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/EncodeQueue')
-rw-r--r--win/C#/EncodeQueue/Encode.cs29
-rw-r--r--win/C#/EncodeQueue/Job.cs1
-rw-r--r--win/C#/EncodeQueue/Queue.cs9
3 files changed, 25 insertions, 14 deletions
diff --git a/win/C#/EncodeQueue/Encode.cs b/win/C#/EncodeQueue/Encode.cs
index 8beca3fe1..49a836bb4 100644
--- a/win/C#/EncodeQueue/Encode.cs
+++ b/win/C#/EncodeQueue/Encode.cs
@@ -14,20 +14,38 @@ namespace Handbrake.EncodeQueue
{
public class Encode
{
+ private int ProcessID { get; set; }
+
+ /// <summary>
+ /// The HB Process
+ /// </summary>
public Process HbProcess { get; set; }
- public int ProcessID { get; set; }
+
+ /// <summary>
+ /// The Process Handle
+ /// </summary>
public IntPtr ProcessHandle { get; set; }
- public String CurrentQuery { get; set; }
- public Boolean IsEncoding { get; set; }
+
+ /// <summary>
+ /// Returns true of HandBrakeCLI.exe is running
+ /// </summary>
+ public Boolean IsEncoding { get; set; }
+ /// <summary>
+ /// Fires when a new CLI Job starts
+ /// </summary>
public event EventHandler EncodeStarted;
+
+ /// <summary>
+ /// Fires when a CLI job finishes.
+ /// </summary>
public event EventHandler EncodeEnded;
/// <summary>
/// Create a preview sample video
/// </summary>
/// <param name="query"></param>
- public void CreatePreviewSampe(string query)
+ public void CreatePreviewSample(string query)
{
Run(query);
}
@@ -63,7 +81,7 @@ namespace Handbrake.EncodeQueue
Process[] before = Process.GetProcesses(); // Get a list of running processes before starting.
HbProcess = Process.Start(cliStart);
ProcessID = Main.GetCliProcess(before);
- CurrentQuery = query;
+
if (HbProcess != null)
ProcessHandle = HbProcess.MainWindowHandle; // Set the process Handle
@@ -125,7 +143,6 @@ namespace Handbrake.EncodeQueue
protected void Finish()
{
IsEncoding = false;
- CurrentQuery = String.Empty;
//Growl
if (Properties.Settings.Default.growlQueue)
diff --git a/win/C#/EncodeQueue/Job.cs b/win/C#/EncodeQueue/Job.cs
index 5771ece8d..7dfe7e518 100644
--- a/win/C#/EncodeQueue/Job.cs
+++ b/win/C#/EncodeQueue/Job.cs
@@ -5,7 +5,6 @@
It may be used under the terms of the GNU General Public License. */
using System;
-using Handbrake.Parsing;
namespace Handbrake.EncodeQueue
{
diff --git a/win/C#/EncodeQueue/Queue.cs b/win/C#/EncodeQueue/Queue.cs
index 0372d90b7..87db876df 100644
--- a/win/C#/EncodeQueue/Queue.cs
+++ b/win/C#/EncodeQueue/Queue.cs
@@ -12,7 +12,6 @@ using System.Threading;
using System.Windows.Forms;
using System.Xml.Serialization;
using Handbrake.Functions;
-using Handbrake.Parsing;
namespace Handbrake.EncodeQueue
{
@@ -316,13 +315,9 @@ namespace Handbrake.EncodeQueue
}
/// <summary>
- /// Stops the current job.
+ /// Run through all the jobs on the queue.
/// </summary>
- public void End()
- {
- Stop();
- }
-
+ /// <param name="state"></param>
private void StartQueue(object state)
{
// Run through each item on the queue