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