2014-03-22 19:37:15 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-03-22 20:50:28 +00:00
|
|
|
|
using System.Linq;
|
2014-03-26 15:06:48 +00:00
|
|
|
|
using System.Xml.Serialization;
|
2014-03-15 04:14:07 +00:00
|
|
|
|
|
2014-03-13 19:08:02 +00:00
|
|
|
|
namespace MediaBrowser.Controller.Dlna
|
|
|
|
|
{
|
|
|
|
|
public class DirectPlayProfile
|
|
|
|
|
{
|
2014-03-26 15:06:48 +00:00
|
|
|
|
[XmlAttribute("container")]
|
2014-03-23 06:07:43 +00:00
|
|
|
|
public string Container { get; set; }
|
2014-03-26 15:06:48 +00:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("audioCodec")]
|
2014-03-22 20:50:28 +00:00
|
|
|
|
public string AudioCodec { get; set; }
|
2014-03-26 15:06:48 +00:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("videoCodec")]
|
2014-03-22 20:50:28 +00:00
|
|
|
|
public string VideoCodec { get; set; }
|
2014-03-15 04:14:07 +00:00
|
|
|
|
|
2014-03-26 15:06:48 +00:00
|
|
|
|
[XmlAttribute("type")]
|
2014-03-13 19:08:02 +00:00
|
|
|
|
public DlnaProfileType Type { get; set; }
|
|
|
|
|
|
2014-03-23 06:07:43 +00:00
|
|
|
|
public List<string> GetContainers()
|
|
|
|
|
{
|
|
|
|
|
return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|
2014-03-22 20:50:28 +00:00
|
|
|
|
|
|
|
|
|
public List<string> GetAudioCodecs()
|
|
|
|
|
{
|
|
|
|
|
return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<string> GetVideoCodecs()
|
|
|
|
|
{
|
|
|
|
|
return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
|
|
|
|
}
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DlnaProfileType
|
|
|
|
|
{
|
|
|
|
|
Audio = 0,
|
2014-03-22 18:25:03 +00:00
|
|
|
|
Video = 1,
|
|
|
|
|
Photo = 2
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|