using System.ComponentModel;
using System.Xml.Serialization;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Dlna;
///
/// A class for transcoding profile information.
///
public class TranscodingProfile
{
///
/// Initializes a new instance of the class.
///
public TranscodingProfile()
{
Conditions = [];
}
///
/// Gets or sets the container.
///
[XmlAttribute("container")]
public string Container { get; set; } = string.Empty;
///
/// Gets or sets the DLNA profile type.
///
[XmlAttribute("type")]
public DlnaProfileType Type { get; set; }
///
/// Gets or sets the video codec.
///
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; } = string.Empty;
///
/// Gets or sets the audio codec.
///
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; } = string.Empty;
///
/// Gets or sets the protocol.
///
[XmlAttribute("protocol")]
public MediaStreamProtocol Protocol { get; set; } = MediaStreamProtocol.http;
///
/// Gets or sets a value indicating whether the content length should be estimated.
///
[DefaultValue(false)]
[XmlAttribute("estimateContentLength")]
public bool EstimateContentLength { get; set; }
///
/// Gets or sets a value indicating whether M2TS mode is enabled.
///
[DefaultValue(false)]
[XmlAttribute("enableMpegtsM2TsMode")]
public bool EnableMpegtsM2TsMode { get; set; }
///
/// Gets or sets the transcoding seek info mode.
///
[DefaultValue(TranscodeSeekInfo.Auto)]
[XmlAttribute("transcodeSeekInfo")]
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
///
/// Gets or sets a value indicating whether timestamps should be copied.
///
[DefaultValue(false)]
[XmlAttribute("copyTimestamps")]
public bool CopyTimestamps { get; set; }
///
/// Gets or sets the encoding context.
///
[DefaultValue(EncodingContext.Streaming)]
[XmlAttribute("context")]
public EncodingContext Context { get; set; }
///
/// Gets or sets a value indicating whether subtitles are allowed in the manifest.
///
[DefaultValue(false)]
[XmlAttribute("enableSubtitlesInManifest")]
public bool EnableSubtitlesInManifest { get; set; }
///
/// Gets or sets the maximum audio channels.
///
[XmlAttribute("maxAudioChannels")]
public string? MaxAudioChannels { get; set; }
///
/// Gets or sets the minimum amount of segments.
///
[DefaultValue(0)]
[XmlAttribute("minSegments")]
public int MinSegments { get; set; }
///
/// Gets or sets the segment length.
///
[DefaultValue(0)]
[XmlAttribute("segmentLength")]
public int SegmentLength { get; set; }
///
/// Gets or sets a value indicating whether breaking the video stream on non-keyframes is supported.
///
[DefaultValue(false)]
[XmlAttribute("breakOnNonKeyFrames")]
public bool BreakOnNonKeyFrames { get; set; }
///
/// Gets or sets the profile conditions.
///
public ProfileCondition[] Conditions { get; set; }
///
/// Gets or sets a value indicating whether variable bitrate encoding is supported.
///
[DefaultValue(true)]
[XmlAttribute("enableAudioVbrEncoding")]
public bool EnableAudioVbrEncoding { get; set; } = true;
}