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