jellyfin/MediaBrowser.Model/Dlna/TranscodingProfile.cs

78 lines
2.2 KiB
C#
Raw Normal View History

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