jellyfin/MediaBrowser.Model/Dlna/DirectPlayProfile.cs

37 lines
1,022 B
C#
Raw Normal View History

2014-03-22 20:37:15 +01:00
using System.Collections.Generic;
using System.Linq;
2014-03-26 16:06:48 +01:00
using System.Xml.Serialization;
2014-03-15 05:14:07 +01:00
2014-04-02 00:23:07 +02:00
namespace MediaBrowser.Model.Dlna
2014-03-13 20:08:02 +01:00
{
public class DirectPlayProfile
{
2014-03-26 16:06:48 +01:00
[XmlAttribute("container")]
2014-03-23 07:07:43 +01:00
public string Container { get; set; }
2014-03-26 16:06:48 +01:00
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; }
2014-03-26 16:06:48 +01:00
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; }
2014-03-15 05:14:07 +01:00
2014-03-26 16:06:48 +01:00
[XmlAttribute("type")]
2014-03-13 20:08:02 +01:00
public DlnaProfileType Type { get; set; }
2014-03-23 07:07:43 +01:00
public List<string> GetContainers()
{
2014-04-02 00:23:07 +02:00
return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
2014-03-13 20:08:02 +01:00
}
public List<string> GetAudioCodecs()
{
2014-04-02 00:23:07 +02:00
return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
}
public List<string> GetVideoCodecs()
{
2014-04-02 00:23:07 +02:00
return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
}
2014-03-13 20:08:02 +01:00
}
}