jellyfin/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs

41 lines
1015 B
C#
Raw Normal View History

2014-03-22 19:37:15 +00:00
using System.Collections.Generic;
using System.Linq;
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-22 19:37:15 +00:00
public string[] Containers { get; set; }
public string AudioCodec { get; set; }
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-15 04:14:07 +00:00
public List<ProfileCondition> Conditions { get; set; }
2014-03-13 19:08:02 +00:00
public DirectPlayProfile()
{
2014-03-15 04:14:07 +00:00
Conditions = new List<ProfileCondition>();
2014-03-22 19:37:15 +00:00
Containers = new string[] { };
2014-03-13 19:08:02 +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,
Video = 1,
Photo = 2
2014-03-13 19:08:02 +00:00
}
}