From 5757d7c7295572f8dd8f078dcceddf8728e075f3 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 19 Dec 2007 22:10:27 +0000 Subject: 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 --- win/C#/Parsing/Parser.cs | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'win/C#/Parsing/Parser.cs') 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; @@ -22,18 +21,6 @@ namespace Handbrake.Parsing /// The total number of titiles to be processed public delegate void ScanProgressEventHandler(object Sender, int CurrentTitle, int TitleCount); - /// - /// A delegate to handle encode progress updates - /// - /// The object which raised the event - /// The current task being processed from the queue - /// The total number of tasks in queue - /// The percentage this task is complete - /// The current encoding fps - /// The average encoding fps for this task - /// The estimated time remaining for this task to complete - public delegate void EncodeProgressEventHandler(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining); - /// /// A simple wrapper around a StreamReader to keep track of the entire output from a cli process /// @@ -66,7 +53,6 @@ namespace Handbrake.Parsing /// public event ScanProgressEventHandler OnScanProgress; - public event EncodeProgressEventHandler OnEncodeProgress; /// /// 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) { -- cgit v1.2.3