// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// Allowed Passthru Options
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services.Encode.Model.Models
{
using System.Collections.Generic;
///
/// Allowed Passthru Options
///
public class AllowedPassthru
{
#region Constructors and Destructors
///
/// Initializes a new instance of the class.
///
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;
}
///
/// Initializes a new instance of the class.
///
///
/// The initial Value.
///
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;
}
///
/// Initializes a new instance of the class.
/// Copy Constructor
///
///
/// The initial value.
///
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
///
/// Gets or sets a value indicating whether AudioAllowAACPass.
///
public bool AudioAllowAACPass { get; set; }
///
/// Gets or sets a value indicating whether AudioAllowAC3Pass.
///
public bool AudioAllowAC3Pass { get; set; }
///
/// Gets or sets a value indicating whether AudioAllowDTSHDPass.
///
public bool AudioAllowDTSHDPass { get; set; }
///
/// Gets or sets a value indicating whether AudioAllowDTSPass.
///
public bool AudioAllowDTSPass { get; set; }
///
/// Gets or sets a value indicating whether AudioAllowMP3Pass.
///
public bool AudioAllowMP3Pass { get; set; }
///
/// Gets or sets a value indicating whether audio allow true hd pass.
///
public bool AudioAllowTrueHDPass { get; set; }
///
/// Gets or sets a value indicating whether audio allow flac pass.
///
public bool AudioAllowFlacPass { get; set; }
///
/// Gets or sets a value indicating whether audio allow ea c 3 pass.
///
public bool AudioAllowEAC3Pass { get; set; }
///
/// Gets or sets AudioEncoderFallback.
///
public AudioEncoder AudioEncoderFallback { get; set; }
///
/// Gets the allowed passthru options.
///
public IEnumerable AllowedPassthruOptions
{
get
{
List audioEncoders = new List();
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;
}
}
///
/// Disable the passthru options.
///
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
}
}