blob: 0da2fd178df2b88b5cffb96acc3cb33bdb67cf34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EncodeProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// Defines the EncodeProgressEventArgs type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Interop.EventArgs
{
using System;
/// <summary>s
/// Encode Progress Event Args
/// </summary>
public class EncodeProgressEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="EncodeProgressEventArgs"/> class.
/// </summary>
/// <param name="fractionComplete">
/// The fraction complete.
/// </param>
/// <param name="currentFrameRate">
/// The current frame rate.
/// </param>
/// <param name="averageFrameRate">
/// The average frame rate.
/// </param>
/// <param name="estimatedTimeLeft">
/// The estimated time left.
/// </param>
/// <param name="passId">
/// The pass id.
/// </param>
/// <param name="pass">
/// The pass.
/// </param>
/// <param name="passCount">
/// The pass count.
/// </param>
/// <param name="isMuxing">
/// A flag to indicate we are muxing.
/// </param>
/// <param name="isSearching">
/// Gets a value indicating that we are in the searching process.
/// </param>
public EncodeProgressEventArgs(double fractionComplete, double currentFrameRate, double averageFrameRate, TimeSpan estimatedTimeLeft, int passId, int pass, int passCount, bool isMuxing, bool isSearching)
{
this.FractionComplete = fractionComplete;
this.CurrentFrameRate = currentFrameRate;
this.AverageFrameRate = averageFrameRate;
this.EstimatedTimeLeft = estimatedTimeLeft;
this.PassId = passId;
this.Pass = pass;
this.PassCount = passCount;
this.IsMuxing = isMuxing;
this.IsSearching = isSearching;
}
/// <summary>
/// Gets the % Complete.
/// </summary>
public double FractionComplete { get; private set; }
/// <summary>
/// Gets the Current FrameRate.
/// </summary>
public double CurrentFrameRate { get; private set; }
/// <summary>
/// Gets the Average FrameRate.
/// </summary>
public double AverageFrameRate { get; private set; }
/// <summary>
/// Gets the Estimated Time Left.
/// </summary>
public TimeSpan EstimatedTimeLeft { get; private set; }
/// <summary>
/// Gets the pass ID.
/// </summary>
/// <remarks>
/// -1: Subtitle scan
/// 0: Encode
/// 1: Encode first pass
/// 2: Encode second pass
/// </remarks>
public int PassId { get; private set; }
/// <summary>
/// Gets the current encoding pass. (1-based)
/// </summary>
public int Pass { get; private set; }
/// <summary>
/// Gets the pass count.
/// </summary>
public int PassCount { get; private set; }
/// <summary>
/// Gets a value indicating that we are in the muxing process.
/// </summary>
public bool IsMuxing { get; private set; }
/// <summary>
/// Gets a value indicating that we are in the searching process.
/// </summary>
public bool IsSearching { get; }
/// <summary>
/// Gets a value indicating that we are doing a subtitle scan pass.
/// </summary>
public bool IsSubtitleScan
{
get
{
if (this.PassId == -1)
{
return true;
}
return false;
}
}
}
}
|