// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// An object that represents a single Title of a DVD
//
// --------------------------------------------------------------------------------------------------------------------
using System.Drawing;
namespace HandBrake.Interop.SourceData
{
using System;
using System.Collections.Generic;
using Model;
///
/// An object that represents a single Title of a DVD
///
public class Title
{
///
/// Initializes a new instance of the class.
///
public Title()
{
this.AudioTracks = new List();
this.Chapters = new List();
this.Subtitles = new List();
}
///
/// Gets Collection of chapters in this Title
///
public List Chapters { get; private set; }
///
/// Gets Collection of audio tracks associated with this Title
///
public List AudioTracks { get; private set; }
///
/// Gets Collection of subtitles associated with this Title
///
public List Subtitles { get; private set; }
///
/// Gets or sets The track number of this Title (1-based).
///
public int TitleNumber { get; set; }
///
/// Gets or sets The length in time of this Title
///
public TimeSpan Duration { get; set; }
///
/// Gets or sets The resolution (width/height) of this Title
///
public Size Resolution { get; set; }
///
/// Gets or sets The aspect ratio of this Title
///
public double AspectRatio { get; set; }
///
/// Gets or sets AngleCount.
///
public int AngleCount { get; set; }
///
/// Gets or sets Par Value
///
public Size ParVal { get; set; }
///
/// Gets or sets the automatically detected crop region for this Title.
/// This is an int array with 4 items in it as so:
/// 0:
/// 1:
/// 2:
/// 3:
///
public Cropping AutoCropDimensions { get; set; }
///
/// Gets Display.
///
public string Display
{
get
{
return this.ToString();
}
}
///
/// Override of the ToString method to provide an easy way to use this object in the UI
///
/// A string representing this track in the format: {title #} (00:00:00)
public override string ToString()
{
return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.TitleNumber, this.Duration.Hours,
this.Duration.Minutes, this.Duration.Seconds);
}
}
}