// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // Defines the EncodeJob type. // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.Model { using System; using System.Collections.Generic; using System.Xml.Serialization; using Encoding; /// /// An Encode Job /// public class EncodeJob { /// /// Gets or sets SourceType. /// public SourceType SourceType { get; set; } /// /// Gets or sets SourcePath. /// public string SourcePath { get; set; } /// /// Gets or sets the 1-based index of the title to encode. /// public int Title { get; set; } /// /// Gets or sets the angle to encode. 0 for default, 1+ for specified angle. /// public int Angle { get; set; } /// /// Gets or sets ChapterStart. /// public int ChapterStart { get; set; } /// /// Gets or sets ChapterEnd. /// public int ChapterEnd { get; set; } /// /// Gets or sets the list of chosen audio tracks (1-based) /// public List ChosenAudioTracks { get; set; } /// /// Gets or sets Subtitles. /// public Subtitles Subtitles { get; set; } /// /// Gets or sets a value indicating whether UseDefaultChapterNames. /// public bool UseDefaultChapterNames { get; set; } /// /// Gets or sets CustomChapterNames. /// public List CustomChapterNames { get; set; } /// /// Gets or sets OutputPath. /// public string OutputPath { get; set; } /// /// Gets or sets EncodingProfile. /// public EncodingProfile EncodingProfile { get; set; } /// /// The length of video to encode. /// [XmlIgnore] public TimeSpan Length { get; set; } /// /// Gets or sets XmlLength. /// [XmlElement("Length")] public string XmlLength { get { return this.Length.ToString(); } set { this.Length = TimeSpan.Parse(value); } } /// /// Clone the Encode Job /// /// /// An EncodeJob Ojbect /// public EncodeJob Clone() { EncodeJob clone = new EncodeJob { SourceType = this.SourceType, SourcePath = this.SourcePath, Title = this.Title, ChapterStart = this.ChapterStart, ChapterEnd = this.ChapterEnd, ChosenAudioTracks = new List(this.ChosenAudioTracks), Subtitles = this.Subtitles, UseDefaultChapterNames = this.UseDefaultChapterNames, OutputPath = this.OutputPath, EncodingProfile = this.EncodingProfile, Length = this.Length }; return clone; } } }