jellyfin/MediaBrowser.Model/Dlna/DirectPlayProfile.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2014-03-22 19:37:15 +00:00
using System.Collections.Generic;
2014-03-15 04:14:07 +00:00
2014-04-01 22:23:07 +00:00
namespace MediaBrowser.Model.Dlna
2014-03-13 19:08:02 +00:00
{
public class DirectPlayProfile
{
2014-03-23 06:07:43 +00:00
public string Container { get; set; }
2014-03-26 15:06:48 +00:00
public string AudioCodec { get; set; }
2014-03-26 15:06:48 +00:00
public string VideoCodec { get; set; }
2014-03-15 04:14:07 +00:00
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()
{
2014-05-08 21:23:24 +00:00
List<string> list = new List<string>();
foreach (string i in (Container ?? string.Empty).Split(','))
{
if (!string.IsNullOrEmpty(i)) list.Add(i);
}
return list;
2014-03-13 19:08:02 +00:00
}
public List<string> GetAudioCodecs()
{
2014-05-08 21:23:24 +00:00
List<string> list = new List<string>();
foreach (string i in (AudioCodec ?? string.Empty).Split(','))
{
if (!string.IsNullOrEmpty(i)) list.Add(i);
}
return list;
}
public List<string> GetVideoCodecs()
{
2014-05-08 21:23:24 +00: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-13 19:08:02 +00:00
}
}