Files
jellyfin-jellyfin-1/MediaBrowser.Controller/Dlna/MediaProfile.cs

50 lines
1.3 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
2014-03-26 11:06:48 -04:00
using System.Xml.Serialization;
2014-03-22 15:37:15 -04:00
namespace MediaBrowser.Controller.Dlna
{
public class MediaProfile
{
2014-03-26 11:06:48 -04:00
[XmlAttribute("container")]
2014-03-22 15:37:15 -04:00
public string Container { get; set; }
2014-03-26 11:06:48 -04:00
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; }
2014-03-26 11:06:48 -04:00
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; }
2014-03-26 11:06:48 -04:00
[XmlAttribute("type")]
2014-03-22 15:37:15 -04:00
public DlnaProfileType Type { get; set; }
2014-03-26 11:06:48 -04:00
[XmlAttribute("orgPn")]
2014-03-22 15:37:15 -04:00
public string OrgPn { get; set; }
2014-03-26 11:06:48 -04:00
[XmlAttribute("mimeType")]
2014-03-22 15:37:15 -04:00
public string MimeType { get; set; }
2014-03-23 15:36:25 -04:00
public ProfileCondition[] Conditions { get; set; }
public MediaProfile()
{
Conditions = new ProfileCondition[] {};
}
2014-03-25 01:25:03 -04:00
public List<string> GetContainers()
{
return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
}
2014-03-23 15:36:25 -04:00
public List<string> GetAudioCodecs()
{
return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
}
public List<string> GetVideoCodecs()
2014-03-22 15:37:15 -04:00
{
return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
2014-03-22 15:37:15 -04:00
}
}
}