// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // An object represending an AudioTrack associated with a Title, in a DVD // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.SourceData { /// /// An object represending an AudioTrack associated with a Title, in a DVD /// public class AudioTrack { /// /// Gets or sets the track number of this Audio Track /// public int TrackNumber { get; set; } /// /// Gets or sets the language (if detected) of this Audio Track /// public string Language { get; set; } /// /// Gets or sets LanguageCode. /// public string LanguageCode { get; set; } /// /// Gets or sets Description. /// public string Description { get; set; } /// /// Gets or sets the frequency (in MHz) of this Audio Track /// public int SampleRate { get; set; } /// /// Gets or sets the bitrate (in kbps) of this Audio Track /// public int Bitrate { get; set; } /// /// Gets Display. /// public string Display { get { return this.GetDisplayString(true); } } /// /// Gets NoTrackDisplay. /// public string NoTrackDisplay { get { return this.GetDisplayString(false); } } /// /// Override of the ToString method to make this object easier to use in the UI /// /// A string formatted as: {track #} {language} ({format}) ({sub-format}) public override string ToString() { return this.GetDisplayString(true); } /// /// Get the Display String /// /// /// The include track number. /// /// /// A String /// private string GetDisplayString(bool includeTrackNumber) { return includeTrackNumber ? (this.TrackNumber + " " + this.Description) : this.Description; } } }