blob: 47ec12828e97f0451978782aff1bf0c426a10ccf (
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AllowedPassthru.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>
// Allowed Passthru Options
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services.Encode.Model.Models
{
using System.Collections.Generic;
/// <summary>
/// Allowed Passthru Options
/// </summary>
public class AllowedPassthru
{
#region Constructors and Destructors
/// <summary>
/// Initializes a new instance of the <see cref="AllowedPassthru"/> class.
/// </summary>
public AllowedPassthru()
{
this.AudioAllowAACPass = true;
this.AudioAllowAC3Pass = true;
this.AudioAllowDTSHDPass = true;
this.AudioAllowDTSPass = true;
this.AudioAllowMP3Pass = true;
this.AudioAllowEAC3Pass = true;
this.AudioAllowTrueHDPass = true;
this.AudioAllowFlacPass = true;
this.AudioEncoderFallback = AudioEncoder.Ac3;
}
/// <summary>
/// Initializes a new instance of the <see cref="AllowedPassthru"/> class.
/// </summary>
/// <param name="initialValue">
/// The initial Value.
/// </param>
public AllowedPassthru(bool initialValue)
{
this.AudioAllowAACPass = initialValue;
this.AudioAllowAC3Pass = initialValue;
this.AudioAllowDTSHDPass = initialValue;
this.AudioAllowDTSPass = initialValue;
this.AudioAllowMP3Pass = initialValue;
this.AudioAllowEAC3Pass = initialValue;
this.AudioAllowTrueHDPass = initialValue;
this.AudioAllowFlacPass = initialValue;
this.AudioEncoderFallback = AudioEncoder.Ac3;
}
/// <summary>
/// Initializes a new instance of the <see cref="AllowedPassthru"/> class.
/// Copy Constructor
/// </summary>
/// <param name="initialValue">
/// The initial value.
/// </param>
public AllowedPassthru(AllowedPassthru initialValue)
{
this.AudioAllowAACPass = initialValue.AudioAllowAACPass;
this.AudioAllowAC3Pass = initialValue.AudioAllowAC3Pass;
this.AudioAllowDTSHDPass = initialValue.AudioAllowDTSHDPass;
this.AudioAllowDTSPass = initialValue.AudioAllowDTSPass;
this.AudioAllowMP3Pass = initialValue.AudioAllowMP3Pass;
this.AudioAllowEAC3Pass = initialValue.AudioAllowEAC3Pass;
this.AudioAllowTrueHDPass = initialValue.AudioAllowTrueHDPass;
this.AudioAllowFlacPass = initialValue.AudioAllowFlacPass;
this.AudioEncoderFallback = initialValue.AudioEncoderFallback;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets a value indicating whether AudioAllowAACPass.
/// </summary>
public bool AudioAllowAACPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowAC3Pass.
/// </summary>
public bool AudioAllowAC3Pass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowDTSHDPass.
/// </summary>
public bool AudioAllowDTSHDPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowDTSPass.
/// </summary>
public bool AudioAllowDTSPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowMP3Pass.
/// </summary>
public bool AudioAllowMP3Pass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether audio allow true hd pass.
/// </summary>
public bool AudioAllowTrueHDPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether audio allow flac pass.
/// </summary>
public bool AudioAllowFlacPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether audio allow ea c 3 pass.
/// </summary>
public bool AudioAllowEAC3Pass { get; set; }
/// <summary>
/// Gets or sets AudioEncoderFallback.
/// </summary>
public AudioEncoder AudioEncoderFallback { get; set; }
/// <summary>
/// Gets the allowed passthru options.
/// </summary>
public IEnumerable<AudioEncoder> AllowedPassthruOptions
{
get
{
List<AudioEncoder> audioEncoders = new List<AudioEncoder>();
if (this.AudioAllowAACPass)
{
audioEncoders.Add(AudioEncoder.AacPassthru);
}
if (this.AudioAllowAC3Pass)
{
audioEncoders.Add(AudioEncoder.Ac3Passthrough);
}
if (this.AudioAllowDTSHDPass)
{
audioEncoders.Add(AudioEncoder.DtsHDPassthrough);
}
if (this.AudioAllowDTSPass)
{
audioEncoders.Add(AudioEncoder.DtsPassthrough);
}
if (this.AudioAllowMP3Pass)
{
audioEncoders.Add(AudioEncoder.Mp3Passthru);
}
if (this.AudioAllowTrueHDPass)
{
audioEncoders.Add(AudioEncoder.TrueHDPassthrough);
}
if (this.AudioAllowFlacPass)
{
audioEncoders.Add(AudioEncoder.FlacPassthru);
}
if (this.AudioAllowEAC3Pass)
{
audioEncoders.Add(AudioEncoder.EAc3Passthrough);
}
return audioEncoders;
}
}
/// <summary>
/// Disable the passthru options.
/// </summary>
public void SetFalse()
{
this.AudioAllowAACPass = false;
this.AudioAllowAC3Pass = false;
this.AudioAllowDTSHDPass = false;
this.AudioAllowDTSPass = false;
this.AudioAllowMP3Pass = false;
this.AudioAllowEAC3Pass = false;
this.AudioAllowTrueHDPass = false;
this.AudioAllowFlacPass = false;
}
#endregion
}
}
|