// --------------------------------------------------------------------------------------------------------------------
//
// 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.Collections.Generic;
using HandBrake.Interop.Model.Encoding;
///
/// The encode job.
///
public class EncodeJob
{
///
/// Initializes a new instance of the class.
///
public EncodeJob()
{
this.Cropping = new Cropping();
}
#region Source
///
/// Gets or sets the source path.
///
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 range type.
///
public VideoRangeType RangeType { get; set; }
///
/// Gets or sets the seek points.
/// This is the number of preview points.
///
public int SeekPoints { get; set; }
///
/// Gets or sets the start at preview.
///
public int StartAtPreview { get; set; }
///
/// Gets or sets the seconds end.
///
public int SecondsEnd { get; set; }
///
/// Gets or sets the seconds start.
///
public double SecondsStart { get; set; }
///
/// 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 frames end.
///
public int FramesEnd { get; set; }
///
/// Gets or sets the frames start.
///
public int FramesStart { get; set; }
///
/// Gets or sets the source type.
///
public SourceType SourceType { get; set; }
#endregion
#region Destination and Output Settings
///
/// Gets or sets the output path.
///
public string OutputPath { get; set; }
///
/// Gets or sets the container name.
///
public string ContainerName { get; set; }
///
/// Gets or sets the preferred extension.
///
public OutputExtension PreferredExtension { get; set; }
///
/// Gets or sets a value indicating whether include chapter markers.
///
public bool IncludeChapterMarkers { get; set; }
///
/// Gets or sets a value indicating whether optimize.
///
public bool Optimize { get; set; }
///
/// Gets or sets a value indicating whether i pod 5 g support.
///
public bool IPod5GSupport { get; set; }
#endregion
#region Picture Settings
///
/// Gets or sets the width.
///
public int Width { get; set; }
///
/// Gets or sets the height.
///
public int Height { get; set; }
///
/// Gets or sets the max width.
///
public int MaxWidth { get; set; }
///
/// Gets or sets the max height.
///
public int MaxHeight { get; set; }
///
/// Gets or sets the scale method.
///
public ScaleMethod ScaleMethod { get; set; }
///
/// Gets or sets the cropping.
///
public Cropping Cropping { get; set; }
///
/// Gets or sets the anamorphic.
///
public Anamorphic Anamorphic { get; set; }
///
/// Gets or sets a value indicating whether use display width.
///
public bool UseDisplayWidth { get; set; }
///
/// Gets or sets the display width.
///
public int DisplayWidth { get; set; }
///
/// Gets or sets a value indicating whether keep display aspect.
///
public bool KeepDisplayAspect { get; set; }
///
/// Gets or sets the pixel aspect x.
///
public int PixelAspectX { get; set; }
///
/// Gets or sets the pixel aspect y.
///
public int PixelAspectY { get; set; }
///
/// Gets or sets the modulus.
///
public int Modulus { get; set; }
///
/// Gets or sets the rotation.
///
public PictureRotation Rotation { get; set; }
///
/// Gets or sets a value indicating whether the picture should be flipped horizontally.
///
public bool FlipHorizontal { get; set; }
///
/// Gets or sets a value indicating whether the picture should be flipped vertically.
///
public bool FlipVertical { get; set; }
#endregion
#region Filters
///
/// Gets or sets the deinterlace.
///
public Deinterlace Deinterlace { get; set; }
///
/// Gets or sets the custom deinterlace.
///
public string CustomDeinterlace { get; set; }
///
/// Gets or sets the decomb.
///
public Decomb Decomb { get; set; }
///
/// Gets or sets the custom decomb.
///
public string CustomDecomb { get; set; }
///
/// Gets or sets the detelecine.
///
public Detelecine Detelecine { get; set; }
///
/// Gets or sets the custom detelecine.
///
public string CustomDetelecine { get; set; }
///
/// Gets or sets the denoise.
///
public Denoise Denoise { get; set; }
///
/// Gets or sets the denoise preset name.
///
public string DenoisePreset { get; set; }
///
/// Gets or sets the denoise tune name.
///
public string DenoiseTune { get; set; }
///
/// Gets or sets a value indicating whether we should use the provided
/// custom denoise string or we should use the preset and tune.
///
public bool UseCustomDenoise { get; set; }
///
/// Gets or sets the custom denoise.
///
public string CustomDenoise { get; set; }
///
/// Gets or sets the deblock.
///
public int Deblock { get; set; }
///
/// Gets or sets a value indicating whether the grayscale filter will be applied.
///
public bool Grayscale { get; set; }
#endregion
#region Video
///
/// Gets or sets the video encoder.
///
public string VideoEncoder { get; set; }
///
/// Gets or sets the video encoder options.
///
public string VideoOptions { get; set; }
///
/// Gets or sets the advanced options.
/// This overrides the VideoOptions, VideoPreset, VideoTunes and VideoLevel
///
public string AdvancedOptions { get; set; }
///
/// Gets or sets the video encoder profile name.
///
public string VideoProfile { get; set; }
///
/// Gets or sets the video encoder preset name.
///
public string VideoPreset { get; set; }
///
/// Gets or sets the video encoder tunes.
///
public List VideoTunes { get; set; }
///
/// Gets or sets the video encoder level.
///
public string VideoLevel { get; set; }
///
/// Gets or sets a value indicating whether to use QSV decoding.
///
public bool QsvDecode { get; set; }
///
/// Gets or sets the video encode rate type.
///
public VideoEncodeRateType VideoEncodeRateType { get; set; }
///
/// Gets or sets the quality.
///
public double Quality { get; set; }
///
/// Gets or sets the target size.
///
public int TargetSize { get; set; }
///
/// Gets or sets the video bitrate.
///
public int VideoBitrate { get; set; }
///
/// Gets or sets a value indicating whether two pass.
///
public bool TwoPass { get; set; }
///
/// Gets or sets a value indicating whether turbo first pass.
///
public bool TurboFirstPass { get; set; }
///
/// Gets or sets the framerate.
///
public double Framerate { get; set; }
///
/// Gets or sets a value indicating whether constant framerate.
///
public bool ConstantFramerate { get; set; }
///
/// Gets or sets a value indicating whether peak framerate.
///
public bool PeakFramerate { get; set; }
#endregion
#region Audio
///
/// Gets or sets the audio encodings.
///
public List AudioEncodings { get; set; }
///
/// Gets or sets the audio encoder fallback.
///
public string AudioEncoderFallback { get; set; }
#endregion
#region Chapter Markers
///
/// Gets or sets a value indicating whether use default chapter names.
///
public bool UseDefaultChapterNames { get; set; }
///
/// Gets or sets the custom chapter names.
///
public List CustomChapterNames { get; set; }
#endregion
#region Subtitles
///
/// Gets or sets the subtitles.
///
public Subtitles Subtitles { get; set; }
#endregion
#region Additional Args
///
/// Gets or sets a value indicating whether to use DXVA hardware decoding.
///
public bool DxvaDecoding { get; set; }
#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,
Subtitles = this.Subtitles,
UseDefaultChapterNames = this.UseDefaultChapterNames,
DxvaDecoding = this.DxvaDecoding,
OutputPath = this.OutputPath,
ContainerName = this.ContainerName,
PreferredExtension = this.PreferredExtension,
IncludeChapterMarkers = this.IncludeChapterMarkers,
Optimize = this.Optimize,
IPod5GSupport = this.IPod5GSupport,
Width = this.Width,
Height = this.Height,
MaxWidth = this.MaxWidth,
MaxHeight = this.MaxHeight,
ScaleMethod = this.ScaleMethod,
Cropping = this.Cropping.Clone(),
Anamorphic = this.Anamorphic,
UseDisplayWidth = this.UseDisplayWidth,
DisplayWidth = this.DisplayWidth,
KeepDisplayAspect = this.KeepDisplayAspect,
PixelAspectX = this.PixelAspectX,
PixelAspectY = this.PixelAspectY,
Modulus = this.Modulus,
Rotation = this.Rotation,
FlipHorizontal = this.FlipHorizontal,
FlipVertical = this.FlipVertical,
Deinterlace = this.Deinterlace,
CustomDeinterlace = this.CustomDeinterlace,
Decomb = this.Decomb,
CustomDecomb = this.CustomDecomb,
Detelecine = this.Detelecine,
CustomDetelecine = this.CustomDetelecine,
Denoise = this.Denoise,
DenoisePreset = this.DenoisePreset,
DenoiseTune = this.DenoiseTune,
UseCustomDenoise = this.UseCustomDenoise,
CustomDenoise = this.CustomDenoise,
Deblock = this.Deblock,
Grayscale = this.Grayscale,
VideoEncoder = this.VideoEncoder,
VideoOptions = this.VideoOptions,
VideoProfile = this.VideoProfile,
VideoPreset = this.VideoPreset,
VideoTunes = this.VideoTunes,
VideoLevel = this.VideoLevel,
QsvDecode = this.QsvDecode,
VideoEncodeRateType = this.VideoEncodeRateType,
Quality = this.Quality,
TargetSize = this.TargetSize,
VideoBitrate = this.VideoBitrate,
TwoPass = this.TwoPass,
TurboFirstPass = this.TurboFirstPass,
Framerate = this.Framerate,
ConstantFramerate = this.ConstantFramerate,
AudioEncodings = new List(this.AudioEncodings),
AudioEncoderFallback = this.AudioEncoderFallback
};
return clone;
}
#endregion
}
}