// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // Defines the EncodeProgressEventArgs type. // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Interop.EventArgs { using System; /// s /// Encode Progress Event Args /// public class EncodeProgressEventArgs : EventArgs { /// /// Initializes a new instance of the class. /// /// /// The fraction complete. /// /// /// The current frame rate. /// /// /// The average frame rate. /// /// /// The estimated time left. /// /// /// The pass id. /// /// /// The pass. /// /// /// The pass count. /// /// /// The code for the state the encode process is in. /// public EncodeProgressEventArgs(double fractionComplete, double currentFrameRate, double averageFrameRate, TimeSpan estimatedTimeLeft, int passId, int pass, int passCount, string stateCode) { this.FractionComplete = fractionComplete; this.CurrentFrameRate = currentFrameRate; this.AverageFrameRate = averageFrameRate; this.EstimatedTimeLeft = estimatedTimeLeft; this.PassId = passId; this.Pass = pass; this.PassCount = passCount; this.StateCode = stateCode; } /// /// Gets the % Complete. /// public double FractionComplete { get; private set; } /// /// Gets the Current FrameRate. /// public double CurrentFrameRate { get; private set; } /// /// Gets the Average FrameRate. /// public double AverageFrameRate { get; private set; } /// /// Gets the Estimated Time Left. /// public TimeSpan EstimatedTimeLeft { get; private set; } /// /// Gets the pass ID. /// /// /// -1: Subtitle scan /// 0: Encode /// 1: Encode first pass /// 2: Encode second pass /// public int PassId { get; private set; } /// /// Gets the current encoding pass. (1-based) /// public int Pass { get; private set; } /// /// Gets the pass count. /// public int PassCount { get; private set; } /// /// Gets the state code of the encode process. /// public string StateCode { get; } /// /// Gets a value indicating that we are doing a subtitle scan pass. /// public bool IsSubtitleScan { get { if (this.PassId == -1) { return true; } return false; } } } }