--- /dev/null
+/* Title.cs $\r
+ \r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Globalization;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+using HandBrake.Interop;\r
+\r
+namespace HandBrake.SourceData\r
+{\r
+ /// <summary>\r
+ /// An object that represents a single Title of a DVD\r
+ /// </summary>\r
+ public class Title\r
+ {\r
+ private static readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
+ private readonly List<AudioTrack> audioTracks;\r
+ private readonly List<Chapter> chapters;\r
+ private readonly List<Subtitle> subtitles;\r
+ \r
+ /// <summary>\r
+ /// The constructor for this object\r
+ /// </summary>\r
+ public Title()\r
+ {\r
+ this.audioTracks = new List<AudioTrack>();\r
+ this.chapters = new List<Chapter>();\r
+ this.subtitles = new List<Subtitle>();\r
+ }\r
+\r
+ /// <summary>\r
+ /// Collection of chapters in this Title\r
+ /// </summary>\r
+ public List<Chapter> Chapters\r
+ {\r
+ get { return this.chapters; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Collection of audio tracks associated with this Title\r
+ /// </summary>\r
+ public List<AudioTrack> AudioTracks\r
+ {\r
+ get { return this.audioTracks; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Collection of subtitles associated with this Title\r
+ /// </summary>\r
+ public List<Subtitle> Subtitles\r
+ {\r
+ get { return this.subtitles; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// The track number of this Title (1-based).\r
+ /// </summary>\r
+ public int TitleNumber { get; set; }\r
+\r
+ /// <summary>\r
+ /// The length in time of this Title\r
+ /// </summary>\r
+ public TimeSpan Duration { get; set; }\r
+\r
+ /// <summary>\r
+ /// The resolution (width/height) of this Title\r
+ /// </summary>\r
+ public Size Resolution { get; set; }\r
+\r
+ /// <summary>\r
+ /// The aspect ratio of this Title\r
+ /// </summary>\r
+ public double AspectRatio { get; set; }\r
+\r
+ public int AngleCount { get; set; }\r
+\r
+ /// <summary>\r
+ /// Par Value\r
+ /// </summary>\r
+ public Size ParVal { get; set; }\r
+\r
+ /// <summary>\r
+ /// The automatically detected crop region for this Title.\r
+ /// This is an int array with 4 items in it as so:\r
+ /// 0: \r
+ /// 1: \r
+ /// 2: \r
+ /// 3: \r
+ /// </summary>\r
+ public Cropping AutoCropDimensions { get; set; }\r
+ \r
+ /// <summary>\r
+ /// Override of the ToString method to provide an easy way to use this object in the UI\r
+ /// </summary>\r
+ /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>\r
+ public override string ToString()\r
+ {\r
+ return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.TitleNumber, this.Duration.Hours,\r
+ this.Duration.Minutes, this.Duration.Seconds);\r
+ }\r
+\r
+ public string Display\r
+ {\r
+ get\r
+ {\r
+ return this.ToString();\r
+ }\r
+ }\r
+ }\r
+}
\ No newline at end of file