summaryrefslogtreecommitdiffstats
path: root/win/C#/Parsing/Parser.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Parsing/Parser.cs')
-rw-r--r--win/C#/Parsing/Parser.cs29
1 files changed, 0 insertions, 29 deletions
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)
{