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

50 lines
1.2 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2014-03-26 15:06:48 +00:00
using System.Xml.Serialization;
2016-12-09 07:23:09 +00:00
using MediaBrowser.Model.Dlna;
2014-04-01 22:23:07 +00:00
namespace MediaBrowser.Model.Dlna
2014-03-22 19:37:15 +00:00
{
2014-04-01 04:16:25 +00:00
public class ResponseProfile
2014-03-22 19:37:15 +00:00
{
2016-12-09 07:23:09 +00:00
[XmlAttribute("container")]
2014-03-22 19:37:15 +00:00
public string Container { get; set; }
2014-03-26 15:06:48 +00:00
2016-12-09 07:23:09 +00:00
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; }
2014-03-26 15:06:48 +00:00
2016-12-09 07:23:09 +00:00
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; }
2016-12-09 07:23:09 +00:00
[XmlAttribute("type")]
2014-03-22 19:37:15 +00:00
public DlnaProfileType Type { get; set; }
2014-03-26 15:06:48 +00:00
2016-12-09 07:23:09 +00:00
[XmlAttribute("orgPn")]
2014-03-22 19:37:15 +00:00
public string OrgPn { get; set; }
2014-03-26 15:06:48 +00:00
2016-12-09 07:23:09 +00:00
[XmlAttribute("mimeType")]
2014-03-22 19:37:15 +00:00
public string MimeType { get; set; }
2014-03-23 19:36:25 +00:00
public ProfileCondition[] Conditions { get; set; }
2014-04-01 04:16:25 +00:00
public ResponseProfile()
2014-03-23 19:36:25 +00:00
{
Conditions = new ProfileCondition[] {};
}
2014-03-25 05:25:03 +00:00
2017-08-19 19:43:35 +00:00
public string[] GetContainers()
2014-03-25 05:25:03 +00:00
{
2017-08-04 20:29:34 +00:00
return ContainerProfile.SplitValue(Container);
2014-03-25 05:25:03 +00:00
}
2014-05-08 21:23:24 +00:00
2017-08-19 19:43:35 +00:00
public string[] GetAudioCodecs()
{
2017-08-19 19:43:35 +00:00
return ContainerProfile.SplitValue(AudioCodec);
}
2017-08-19 19:43:35 +00:00
public string[] GetVideoCodecs()
2014-03-22 19:37:15 +00:00
{
2017-08-19 19:43:35 +00:00
return ContainerProfile.SplitValue(VideoCodec);
2014-03-22 19:37:15 +00:00
}
}
}