// --------------------------------------------------------------------------------------------------------------------
//
// 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 HandBrake.Interop.Model.Encoding;
///
/// The encode job.
///
public class EncodeJob
{
#region Properties
///
/// Gets or sets the angle to encode. 0 for default, 1+ for specified angle.
///
public int Angle { get; set; }
///
/// Gets or sets the chapter end.
///
public int ChapterEnd { get; set; }
///
/// Gets or sets the chapter start.
///
public int ChapterStart { get; set; }
///
/// Gets or sets the list of chosen audio tracks (1-based)
///
public List ChosenAudioTracks { get; set; }
///
/// Gets or sets the custom chapter names.
///
public List CustomChapterNames { get; set; }
///
/// Gets or sets the encoding profile.
///
public EncodingProfile EncodingProfile { get; set; }
///
/// Gets or sets the frames end.
///
public int FramesEnd { get; set; }
///
/// Gets or sets the frames start.
///
public int FramesStart { get; set; }
///
/// Gets or sets the length. The length of video to encode.
///
[XmlIgnore]
public TimeSpan Length { get; set; }
///
/// Gets or sets the output path.
///
public string OutputPath { get; set; }
///
/// Gets or sets the range type.
///
public VideoRangeType RangeType { get; set; }
///
/// Gets or sets the seconds end.
///
public double SecondsEnd { get; set; }
///
/// Gets or sets the seconds start.
///
public double SecondsStart { get; set; }
///
/// Gets or sets the source path.
///
public string SourcePath { get; set; }
///
/// Gets or sets the source type.
///
public SourceType SourceType { get; set; }
///
/// Gets or sets the subtitles.
///
public Subtitles Subtitles { get; set; }
///
/// Gets or sets the 1-based index of the title to encode.
///
public int Title { get; set; }
///
/// Gets or sets a value indicating whether use default chapter names.
///
public bool UseDefaultChapterNames { get; set; }
///
/// Gets or sets a value indicating whether to use DXVA hardware decoding.
///
public bool DxvaDecoding { get; set; }
///
/// Gets or sets the xml length.
///
[XmlElement("Length")]
public string XmlLength
{
get
{
return this.Length.ToString();
}
set
{
this.Length = TimeSpan.Parse(value);
}
}
#endregion
#region Public Methods
///
/// The clone.
///
///
/// The .
///
public EncodeJob Clone()
{
var clone = new EncodeJob
{
SourceType = this.SourceType,
SourcePath = this.SourcePath,
Title = this.Title,
Angle = this.Angle,
RangeType = this.RangeType,
ChapterStart = this.ChapterStart,
ChapterEnd = this.ChapterEnd,
SecondsStart = this.SecondsStart,
SecondsEnd = this.SecondsEnd,
FramesStart = this.FramesStart,
FramesEnd = this.FramesEnd,
ChosenAudioTracks = new List(this.ChosenAudioTracks),
Subtitles = this.Subtitles,
UseDefaultChapterNames = this.UseDefaultChapterNames,
DxvaDecoding = this.DxvaDecoding,
OutputPath = this.OutputPath,
EncodingProfile = this.EncodingProfile,
Length = this.Length
};
return clone;
}
#endregion
}
}