2014-03-22 13:50:28 -07:00
|
|
|
|
using System.Collections.Generic;
|
2014-03-26 08:06:48 -07:00
|
|
|
|
using System.Xml.Serialization;
|
2016-12-09 00:23:09 -07:00
|
|
|
|
using MediaBrowser.Model.Dlna;
|
2014-03-22 13:50:28 -07:00
|
|
|
|
|
2014-04-01 15:23:07 -07:00
|
|
|
|
namespace MediaBrowser.Model.Dlna
|
2014-03-22 12:37:15 -07:00
|
|
|
|
{
|
2014-03-31 21:16:25 -07:00
|
|
|
|
public class ResponseProfile
|
2014-03-22 12:37:15 -07:00
|
|
|
|
{
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("container")]
|
2014-03-22 12:37:15 -07:00
|
|
|
|
public string Container { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("audioCodec")]
|
2014-03-22 13:50:28 -07:00
|
|
|
|
public string AudioCodec { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("videoCodec")]
|
2014-03-22 13:50:28 -07:00
|
|
|
|
public string VideoCodec { get; set; }
|
|
|
|
|
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("type")]
|
2014-03-22 12:37:15 -07:00
|
|
|
|
public DlnaProfileType Type { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("orgPn")]
|
2014-03-22 12:37:15 -07:00
|
|
|
|
public string OrgPn { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
2016-12-09 00:23:09 -07:00
|
|
|
|
[XmlAttribute("mimeType")]
|
2014-03-22 12:37:15 -07:00
|
|
|
|
public string MimeType { get; set; }
|
|
|
|
|
|
2014-03-23 12:36:25 -07:00
|
|
|
|
public ProfileCondition[] Conditions { get; set; }
|
|
|
|
|
|
2014-03-31 21:16:25 -07:00
|
|
|
|
public ResponseProfile()
|
2014-03-23 12:36:25 -07:00
|
|
|
|
{
|
|
|
|
|
Conditions = new ProfileCondition[] {};
|
|
|
|
|
}
|
2014-03-24 22:25:03 -07:00
|
|
|
|
|
|
|
|
|
public List<string> GetContainers()
|
|
|
|
|
{
|
2017-08-04 13:29:34 -07:00
|
|
|
|
return ContainerProfile.SplitValue(Container);
|
2014-03-24 22:25:03 -07:00
|
|
|
|
}
|
2014-05-08 14:23:24 -07:00
|
|
|
|
|
2014-03-22 13:50:28 -07:00
|
|
|
|
public List<string> GetAudioCodecs()
|
|
|
|
|
{
|
2014-05-08 14:23:24 -07:00
|
|
|
|
List<string> list = new List<string>();
|
|
|
|
|
foreach (string i in (AudioCodec ?? string.Empty).Split(','))
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(i)) list.Add(i);
|
|
|
|
|
}
|
|
|
|
|
return list;
|
2014-03-22 13:50:28 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<string> GetVideoCodecs()
|
2014-03-22 12:37:15 -07:00
|
|
|
|
{
|
2014-05-08 14:23:24 -07:00
|
|
|
|
List<string> list = new List<string>();
|
|
|
|
|
foreach (string i in (VideoCodec ?? string.Empty).Split(','))
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(i)) list.Add(i);
|
|
|
|
|
}
|
|
|
|
|
return list;
|
2014-03-22 12:37:15 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|