blob: 4e4f241df1b0d91f43a06b03c5486984a9dc3b84 (
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
130
131
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HBAudioEncoder.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>
// The hb audio encoder.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Interop.Model.Encoding
{
using HandBrake.Interop.Interop.HbLib;
/// <summary>
/// The hb audio encoder.
/// </summary>
public class HBAudioEncoder
{
/// <summary>
/// Initializes a new instance of the <see cref="HBAudioEncoder"/> class.
/// </summary>
/// <param name="compatibleContainers">
/// The compatible containers.
/// </param>
/// <param name="compressionLimits">
/// The compression limits.
/// </param>
/// <param name="defaultCompression">
/// The default compression.
/// </param>
/// <param name="defaultQuality">
/// The default quality.
/// </param>
/// <param name="displayName">
/// The display name.
/// </param>
/// <param name="id">
/// The id.
/// </param>
/// <param name="qualityLimits">
/// The quality limits.
/// </param>
/// <param name="shortName">
/// The short name.
/// </param>
public HBAudioEncoder(int compatibleContainers, RangeLimits compressionLimits, float defaultCompression, float defaultQuality, string displayName, int id, RangeLimits qualityLimits, string shortName)
{
this.CompatibleContainers = compatibleContainers;
this.CompressionLimits = compressionLimits;
this.DefaultCompression = defaultCompression;
this.DefaultQuality = defaultQuality;
this.DisplayName = displayName;
this.Id = id;
this.QualityLimits = qualityLimits;
this.ShortName = shortName;
}
/// <summary>
/// Gets the compatible containers.
/// </summary>
public int CompatibleContainers { get; private set; }
/// <summary>
/// Gets the compression limits.
/// </summary>
public RangeLimits CompressionLimits { get; private set; }
/// <summary>
/// Gets the default compression.
/// </summary>
public float DefaultCompression { get; private set; }
/// <summary>
/// Gets the default quality.
/// </summary>
public float DefaultQuality { get; private set; }
/// <summary>
/// Gets the display name.
/// </summary>
public string DisplayName { get; private set; }
/// <summary>
/// Gets the id.
/// </summary>
public int Id { get; private set; }
/// <summary>
/// Gets a value indicating whether the encoder is passthrough.
/// </summary>
public bool IsPassthrough
{
get
{
return (this.Id & NativeConstants.HB_ACODEC_PASS_FLAG) > 0;
}
}
/// <summary>
/// Gets or sets the quality limits.
/// </summary>
public RangeLimits QualityLimits { get; set; }
/// <summary>
/// Gets or sets the short name.
/// </summary>
public string ShortName { get; set; }
/// <summary>
/// Gets a value indicating whether the encoder supports compression.
/// </summary>
public bool SupportsCompression
{
get
{
return this.CompressionLimits.High >= 0;
}
}
/// <summary>
/// Gets a value indicating whether the encoder supports quality.
/// </summary>
public bool SupportsQuality
{
get
{
return this.QualityLimits.High >= 0;
}
}
}
}
|