1 // --------------------------------------------------------------------------------------------------------------------
\r
2 // <copyright file="EncodeJob.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 // Defines the EncodeJob type.
\r
8 // --------------------------------------------------------------------------------------------------------------------
\r
10 namespace HandBrake.Interop.Model
\r
13 using System.Collections.Generic;
\r
14 using System.Xml.Serialization;
\r
20 public class EncodeJob
\r
23 /// Gets or sets SourceType.
\r
25 public SourceType SourceType { get; set; }
\r
28 /// Gets or sets SourcePath.
\r
30 public string SourcePath { get; set; }
\r
33 /// Gets or sets the 1-based index of the title to encode.
\r
35 public int Title { get; set; }
\r
38 /// Gets or sets the angle to encode. 0 for default, 1+ for specified angle.
\r
40 public int Angle { get; set; }
\r
43 /// Gets or sets ChapterStart.
\r
45 public int ChapterStart { get; set; }
\r
48 /// Gets or sets ChapterEnd.
\r
50 public int ChapterEnd { get; set; }
\r
53 /// Gets or sets the list of chosen audio tracks (1-based)
\r
55 public List<int> ChosenAudioTracks { get; set; }
\r
58 /// Gets or sets Subtitles.
\r
60 public Subtitles Subtitles { get; set; }
\r
63 /// Gets or sets a value indicating whether UseDefaultChapterNames.
\r
65 public bool UseDefaultChapterNames { get; set; }
\r
68 /// Gets or sets CustomChapterNames.
\r
70 public List<string> CustomChapterNames { get; set; }
\r
73 /// Gets or sets OutputPath.
\r
75 public string OutputPath { get; set; }
\r
78 /// Gets or sets EncodingProfile.
\r
80 public EncodingProfile EncodingProfile { get; set; }
\r
83 /// The length of video to encode.
\r
86 public TimeSpan Length { get; set; }
\r
89 /// Gets or sets XmlLength.
\r
91 [XmlElement("Length")]
\r
92 public string XmlLength
\r
94 get { return this.Length.ToString(); }
\r
95 set { this.Length = TimeSpan.Parse(value); }
\r
99 /// Clone the Encode Job
\r
102 /// An EncodeJob Ojbect
\r
104 public EncodeJob Clone()
\r
106 EncodeJob clone = new EncodeJob
\r
108 SourceType = this.SourceType,
\r
109 SourcePath = this.SourcePath,
\r
110 Title = this.Title,
\r
111 ChapterStart = this.ChapterStart,
\r
112 ChapterEnd = this.ChapterEnd,
\r
113 ChosenAudioTracks = new List<int>(this.ChosenAudioTracks),
\r
114 Subtitles = this.Subtitles,
\r
115 UseDefaultChapterNames = this.UseDefaultChapterNames,
\r
116 OutputPath = this.OutputPath,
\r
117 EncodingProfile = this.EncodingProfile,
\r
118 Length = this.Length
\r