// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The hb audio encoder.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Interop.Model.Encoding
{
using HandBrake.Interop.Interop.HbLib;
///
/// The hb audio encoder.
///
public class HBAudioEncoder
{
///
/// Initializes a new instance of the class.
///
///
/// The compatible containers.
///
///
/// The compression limits.
///
///
/// The default compression.
///
///
/// The default quality.
///
///
/// The display name.
///
///
/// The id.
///
///
/// The quality limits.
///
///
/// The short name.
///
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;
}
///
/// Gets the compatible containers.
///
public int CompatibleContainers { get; private set; }
///
/// Gets the compression limits.
///
public RangeLimits CompressionLimits { get; private set; }
///
/// Gets the default compression.
///
public float DefaultCompression { get; private set; }
///
/// Gets the default quality.
///
public float DefaultQuality { get; private set; }
///
/// Gets the display name.
///
public string DisplayName { get; private set; }
///
/// Gets the id.
///
public int Id { get; private set; }
///
/// Gets a value indicating whether the encoder is passthrough.
///
public bool IsPassthrough
{
get
{
return (this.Id & NativeConstants.HB_ACODEC_PASS_FLAG) > 0;
}
}
///
/// Gets or sets the quality limits.
///
public RangeLimits QualityLimits { get; set; }
///
/// Gets or sets the short name.
///
public string ShortName { get; set; }
///
/// Gets a value indicating whether the encoder supports compression.
///
public bool SupportsCompression
{
get
{
return this.CompressionLimits.High >= 0;
}
}
///
/// Gets a value indicating whether the encoder supports quality.
///
public bool SupportsQuality
{
get
{
return this.QualityLimits.High >= 0;
}
}
}
}