From 399ab292d7feddf5e83be866caafbaef634eca87 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 12 Jun 2011 16:54:23 +0000 Subject: WinGui: Bring in the HandBrake Interop library written by RandomEngy. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4045 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrakeInterop/SourceData/AudioTrack.cs | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs') diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs new file mode 100644 index 000000000..a7b7926c1 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs @@ -0,0 +1,90 @@ +/* AudioTrack.cs $ + + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; + +namespace HandBrake.SourceData +{ + /// + /// An object represending an AudioTrack associated with a Title, in a DVD + /// + public class AudioTrack + { + /// + /// The track number of this Audio Track + /// + public int TrackNumber { get; set; } + + /// + /// Gets or sets the audio codec of this Track. + /// + public AudioCodec Codec { get; set; } + + /// + /// The language (if detected) of this Audio Track + /// + public string Language { get; set; } + + public string LanguageCode { get; set; } + + public string Description { get; set; } + + /// + /// Gets or sets the channel layout of this Audio Track. + /// + public int ChannelLayout { get; set; } + + /// + /// The frequency (in Hz) of this Audio Track + /// + public int SampleRate { get; set; } + + /// + /// The bitrate (in bits/sec) of this Audio Track. + /// + public int Bitrate { get; set; } + + public string Display + { + get + { + return this.GetDisplayString(true); + } + } + + 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); + } + + private string GetDisplayString(bool includeTrackNumber) + { + if (includeTrackNumber) + { + return this.TrackNumber + " " + this.Description; + } + else + { + return this.Description; + } + } + } +} \ No newline at end of file -- cgit v1.2.3