diff options
author | sr55 <[email protected]> | 2007-12-19 22:10:27 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-12-19 22:10:27 +0000 |
commit | 5757d7c7295572f8dd8f078dcceddf8728e075f3 (patch) | |
tree | 10cd21ca48ae8f148fbe12aa5be3f17c1e47ef3a /win/C#/Parsing | |
parent | 9edd509f7e84d131107f523219032f221a355e56 (diff) |
WinGui:
- Some code clean up + removal of old unused code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1137 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing')
-rw-r--r-- | win/C#/Parsing/AudioTrack.cs | 1 | ||||
-rw-r--r-- | win/C#/Parsing/Chapter.cs | 1 | ||||
-rw-r--r-- | win/C#/Parsing/DVD.cs | 7 | ||||
-rw-r--r-- | win/C#/Parsing/Parser.cs | 29 | ||||
-rw-r--r-- | win/C#/Parsing/Subtitle.cs | 1 | ||||
-rw-r--r-- | win/C#/Parsing/Title.cs | 1 |
6 files changed, 0 insertions, 40 deletions
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index 22861b9e6..95d9f307e 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -1,6 +1,5 @@ using System;
using System.Collections.Generic;
-using System.Text;
using System.IO;
using System.Text.RegularExpressions;
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs index 6496354c9..caea54bb5 100644 --- a/win/C#/Parsing/Chapter.cs +++ b/win/C#/Parsing/Chapter.cs @@ -1,6 +1,5 @@ using System;
using System.Collections.Generic;
-using System.Text;
using System.IO;
using System.Text.RegularExpressions;
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs index 62a40d81b..f0982a47c 100644 --- a/win/C#/Parsing/DVD.cs +++ b/win/C#/Parsing/DVD.cs @@ -1,14 +1,7 @@ using System;
using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.IO;
-using System.Threading;
-using System.Diagnostics;
namespace Handbrake.Parsing
{
diff --git a/win/C#/Parsing/Parser.cs b/win/C#/Parsing/Parser.cs index b3edc89d9..799e8a303 100644 --- a/win/C#/Parsing/Parser.cs +++ b/win/C#/Parsing/Parser.cs @@ -1,6 +1,5 @@ using System;
using System.Collections.Generic;
-using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
@@ -23,18 +22,6 @@ namespace Handbrake.Parsing public delegate void ScanProgressEventHandler(object Sender, int CurrentTitle, int TitleCount);
/// <summary>
- /// A delegate to handle encode progress updates
- /// </summary>
- /// <param name="Sender">The object which raised the event</param>
- /// <param name="CurrentTask">The current task being processed from the queue</param>
- /// <param name="TaskCount">The total number of tasks in queue</param>
- /// <param name="PercentComplete">The percentage this task is complete</param>
- /// <param name="CurrentFps">The current encoding fps</param>
- /// <param name="AverageFps">The average encoding fps for this task</param>
- /// <param name="TimeRemaining">The estimated time remaining for this task to complete</param>
- public delegate void EncodeProgressEventHandler(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining);
-
- /// <summary>
/// A simple wrapper around a StreamReader to keep track of the entire output from a cli process
/// </summary>
internal class Parser : StreamReader
@@ -66,7 +53,6 @@ namespace Handbrake.Parsing /// </summary>
public event ScanProgressEventHandler OnScanProgress;
- public event EncodeProgressEventHandler OnEncodeProgress;
/// <summary>
/// Default constructor for this object
@@ -93,21 +79,6 @@ namespace Handbrake.Parsing {
OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));
}
- m = Regex.Match(tmp, @"^Encoding: task ([0-9]*) of ([0-9]*), ([0-9]*\.[0-9]*) %( \(([0-9]*\.[0-9]*) fps, avg ([0-9]*\.[0-9]*) fps, ETA ([0-9]{2})h([0-9]{2})m([0-9]{2})s\))?");
- if (m.Success && OnEncodeProgress != null)
- {
- int currentTask = int.Parse(m.Groups[1].Value);
- int totalTasks = int.Parse(m.Groups[2].Value);
- float percent = float.Parse(m.Groups[3].Value, Functions.CLI.Culture);
- float currentFps = m.Groups[5].Value == string.Empty ? 0.0F : float.Parse(m.Groups[5].Value, Functions.CLI.Culture);
- float avgFps = m.Groups[6].Value == string.Empty ? 0.0F : float.Parse(m.Groups[6].Value, Functions.CLI.Culture);
- TimeSpan remaining = TimeSpan.Zero;
- if (m.Groups[7].Value != string.Empty)
- {
- remaining = TimeSpan.Parse(m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value);
- }
- OnEncodeProgress(this, currentTask, totalTasks, percent, currentFps, avgFps, remaining);
- }
}
catch (Exception exc)
{
diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs index 8fb889f8f..6d83d2613 100644 --- a/win/C#/Parsing/Subtitle.cs +++ b/win/C#/Parsing/Subtitle.cs @@ -1,6 +1,5 @@ using System;
using System.Collections.Generic;
-using System.Text;
using System.IO;
using System.Text.RegularExpressions;
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs index 744e5b619..b1f02d9c6 100644 --- a/win/C#/Parsing/Title.cs +++ b/win/C#/Parsing/Title.cs @@ -1,6 +1,5 @@ using System;
using System.Collections.Generic;
-using System.Text;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
|