jellyfin-server/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs

100 lines
3.5 KiB
C#
Raw Normal View History

2015-01-02 06:12:58 +00:00
using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Controller.MediaEncoding
{
public class EncodingJobOptions
{
public string OutputContainer { get; set; }
2015-01-17 04:29:53 +00:00
public string OutputDirectory { get; set; }
2015-01-02 06:12:58 +00:00
public long? StartTimeTicks { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public int? MaxWidth { get; set; }
public int? MaxHeight { get; set; }
public bool Static = false;
public float? Framerate { get; set; }
public float? MaxFramerate { get; set; }
public string Profile { get; set; }
public int? Level { get; set; }
public string DeviceId { get; set; }
public string ItemId { get; set; }
public string MediaSourceId { get; set; }
public string AudioCodec { get; set; }
public bool EnableAutoStreamCopy { get; set; }
public int? MaxAudioChannels { get; set; }
public int? AudioChannels { get; set; }
public int? AudioBitRate { get; set; }
public int? AudioSampleRate { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public EncodingContext Context { get; set; }
public string VideoCodec { get; set; }
public int? VideoBitRate { get; set; }
public int? AudioStreamIndex { get; set; }
public int? VideoStreamIndex { get; set; }
public int? SubtitleStreamIndex { get; set; }
public int? MaxRefFrames { get; set; }
public int? MaxVideoBitDepth { get; set; }
2015-04-09 17:30:18 +00:00
public int? CpuCoreLimit { get; set; }
public bool ReadInputAtNativeFramerate { get; set; }
2015-01-02 06:12:58 +00:00
public SubtitleDeliveryMethod SubtitleMethod { get; set; }
public bool CopyTimestamps { get; set; }
2015-01-02 06:12:58 +00:00
/// <summary>
/// Gets a value indicating whether this instance has fixed resolution.
/// </summary>
/// <value><c>true</c> if this instance has fixed resolution; otherwise, <c>false</c>.</value>
public bool HasFixedResolution
{
get
{
return Width.HasValue || Height.HasValue;
}
}
public bool? Cabac { get; set; }
public EncodingJobOptions()
{
}
public EncodingJobOptions(StreamInfo info, DeviceProfile deviceProfile)
{
OutputContainer = info.Container;
StartTimeTicks = info.StartPositionTicks;
MaxWidth = info.MaxWidth;
MaxHeight = info.MaxHeight;
MaxFramerate = info.MaxFramerate;
Profile = info.VideoProfile;
Level = info.VideoLevel;
ItemId = info.ItemId;
MediaSourceId = info.MediaSourceId;
AudioCodec = info.AudioCodec;
MaxAudioChannels = info.MaxAudioChannels;
AudioBitRate = info.AudioBitrate;
AudioSampleRate = info.TargetAudioSampleRate;
DeviceProfile = deviceProfile;
VideoCodec = info.VideoCodec;
VideoBitRate = info.VideoBitrate;
AudioStreamIndex = info.AudioStreamIndex;
MaxRefFrames = info.MaxRefFrames;
MaxVideoBitDepth = info.MaxVideoBitDepth;
SubtitleMethod = info.SubtitleDeliveryMethod;
Cabac = info.Cabac;
Context = info.Context;
2015-02-05 03:01:37 +00:00
2016-03-07 18:50:58 +00:00
if (info.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
2015-02-05 03:01:37 +00:00
{
SubtitleStreamIndex = info.SubtitleStreamIndex;
}
2015-01-02 06:12:58 +00:00
}
}
}