jellyfin-server/MediaBrowser.Model/Dlna/TranscodingProfile.cs

70 lines
2.0 KiB
C#
Raw Normal View History

2020-02-04 00:49:27 +00:00
#pragma warning disable CS1591
using System.ComponentModel;
using System.Xml.Serialization;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Model.Dlna
{
public class TranscodingProfile
{
[XmlAttribute("container")]
public string Container { get; set; } = string.Empty;
2018-12-27 23:27:57 +00:00
[XmlAttribute("type")]
public DlnaProfileType Type { get; set; }
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; } = string.Empty;
2018-12-27 23:27:57 +00:00
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; } = string.Empty;
2018-12-27 23:27:57 +00:00
[XmlAttribute("protocol")]
public string Protocol { get; set; } = string.Empty;
2018-12-27 23:27:57 +00:00
[DefaultValue(false)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("estimateContentLength")]
public bool EstimateContentLength { get; set; }
[DefaultValue(false)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("enableMpegtsM2TsMode")]
public bool EnableMpegtsM2TsMode { get; set; }
[DefaultValue(TranscodeSeekInfo.Auto)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("transcodeSeekInfo")]
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
[DefaultValue(false)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("copyTimestamps")]
public bool CopyTimestamps { get; set; }
[DefaultValue(EncodingContext.Streaming)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("context")]
public EncodingContext Context { get; set; }
[DefaultValue(false)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("enableSubtitlesInManifest")]
public bool EnableSubtitlesInManifest { get; set; }
[XmlAttribute("maxAudioChannels")]
public string? MaxAudioChannels { get; set; }
2018-12-27 23:27:57 +00:00
[DefaultValue(0)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("minSegments")]
public int MinSegments { get; set; }
[DefaultValue(0)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("segmentLength")]
public int SegmentLength { get; set; }
[DefaultValue(false)]
2018-12-27 23:27:57 +00:00
[XmlAttribute("breakOnNonKeyFrames")]
public bool BreakOnNonKeyFrames { get; set; }
public string[] GetAudioCodecs()
{
return ContainerProfile.SplitValue(AudioCodec);
}
}
}