- 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\))?");\r
- if (m.Success && OnEncodeProgress != null)\r
- {\r
- int currentTask = int.Parse(m.Groups[1].Value);\r
- int totalTasks = int.Parse(m.Groups[2].Value);\r
- float percent = float.Parse(m.Groups[3].Value, Functions.CLI.Culture);\r
- float currentFps = m.Groups[5].Value == string.Empty ? 0.0F : float.Parse(m.Groups[5].Value, Functions.CLI.Culture);\r
- float avgFps = m.Groups[6].Value == string.Empty ? 0.0F : float.Parse(m.Groups[6].Value, Functions.CLI.Culture);\r
- TimeSpan remaining = TimeSpan.Zero;\r
- if (m.Groups[7].Value != string.Empty)\r
- {\r
- remaining = TimeSpan.Parse(m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value);\r
- }\r
- OnEncodeProgress(this, currentTask, totalTasks, percent, currentFps, avgFps, remaining);\r
- }\r