1 // --------------------------------------------------------------------------------------------------------------------
\r
2 // <copyright file="AudioTrack.cs" company="HandBrake Project (http://handbrake.fr)">
\r
3 // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
\r
6 // An object represending an AudioTrack associated with a Title, in a DVD
\r
8 // --------------------------------------------------------------------------------------------------------------------
\r
10 namespace HandBrake.Interop.SourceData
\r
13 /// An object represending an AudioTrack associated with a Title, in a DVD
\r
15 public class AudioTrack
\r
18 /// Gets or sets the track number of this Audio Track
\r
20 public int TrackNumber { get; set; }
\r
23 /// Gets or sets the language (if detected) of this Audio Track
\r
25 public string Language { get; set; }
\r
28 /// Gets or sets LanguageCode.
\r
30 public string LanguageCode { get; set; }
\r
33 /// Gets or sets Description.
\r
35 public string Description { get; set; }
\r
38 /// Gets or sets the frequency (in MHz) of this Audio Track
\r
40 public int SampleRate { get; set; }
\r
43 /// Gets or sets the bitrate (in kbps) of this Audio Track
\r
45 public int Bitrate { get; set; }
\r
50 public string Display
\r
54 return this.GetDisplayString(true);
\r
59 /// Gets NoTrackDisplay.
\r
61 public string NoTrackDisplay
\r
65 return this.GetDisplayString(false);
\r
70 /// Override of the ToString method to make this object easier to use in the UI
\r
72 /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>
\r
73 public override string ToString()
\r
75 return this.GetDisplayString(true);
\r
79 /// Get the Display String
\r
81 /// <param name="includeTrackNumber">
\r
82 /// The include track number.
\r
87 private string GetDisplayString(bool includeTrackNumber)
\r
89 return includeTrackNumber ? (this.TrackNumber + " " + this.Description) : this.Description;
\r