diff options
author | sr55 <[email protected]> | 2015-03-07 22:54:38 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-03-07 22:54:38 +0000 |
commit | 24f6d27cf9d979ab0743665b37e60fd1295776d1 (patch) | |
tree | 7181504b621d9dcf6c3e59990c135ec72ed84a3c /win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs | |
parent | 7705413a03a90c16734b40fb7bc492be8b56ab6f (diff) |
WinGui: Updating the app to handle the latest JSON API change regarding the Automatic title scan on encode. This Simplifies the API in the services library.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6977 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs index 9b817069b..3ba8a847f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs @@ -235,72 +235,6 @@ namespace HandBrake.ApplicationServices.Services.Encode }
/// <summary>
- /// Pase the status output (from standard output)
- /// </summary>
- /// <param name="encodeStatus">
- /// The encode Status.
- /// </param>
- /// <param name="startTime">
- /// The start Time.
- /// </param>
- /// <returns>
- /// The <see cref="EncodeProgressEventArgs"/>.
- /// </returns>
- public EncodeProgressEventArgs ReadEncodeStatus(string encodeStatus, DateTime startTime)
- {
- try
- {
- Match m = Regex.Match(
- encodeStatus,
- @"^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)
- {
- int currentTask = int.Parse(m.Groups[1].Value);
- int totalTasks = int.Parse(m.Groups[2].Value);
- float percent = float.Parse(m.Groups[3].Value, CultureInfo.InvariantCulture);
- float currentFps = m.Groups[5].Value == string.Empty
- ? 0.0F
- : float.Parse(m.Groups[5].Value, CultureInfo.InvariantCulture);
- float avgFps = m.Groups[6].Value == string.Empty
- ? 0.0F
- : float.Parse(m.Groups[6].Value, CultureInfo.InvariantCulture);
- string remaining = string.Empty;
- if (m.Groups[7].Value != string.Empty)
- {
- remaining = m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value;
- }
- if (string.IsNullOrEmpty(remaining))
- {
- remaining = "Calculating ...";
- }
-
- EncodeProgressEventArgs eventArgs = new EncodeProgressEventArgs
- {
- AverageFrameRate = avgFps,
- CurrentFrameRate = currentFps,
- EstimatedTimeLeft =
- Converters.EncodeToTimespan(
- remaining),
- PercentComplete = percent,
- Task = currentTask,
- TaskCount = totalTasks,
- ElapsedTime =
- DateTime.Now - startTime,
- };
-
- return eventArgs;
- }
-
- return null;
- }
- catch (Exception)
- {
- return null;
- }
- }
-
- /// <summary>
/// Setup the logging.
/// </summary>
/// <param name="encodeQueueTask">
|