add more codecs to direct play profiles

This commit is contained in:
Luke Pulverenti
2014-03-22 16:50:28 -04:00
parent e2c0194744
commit 9b294c8bc9
6 changed files with 135 additions and 23 deletions

View File

@@ -1,12 +1,13 @@
using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Controller.Dlna
{
public class DirectPlayProfile
{
public string[] Containers { get; set; }
public string[] AudioCodecs { get; set; }
public string[] VideoCodecs { get; set; }
public string AudioCodec { get; set; }
public string VideoCodec { get; set; }
public DlnaProfileType Type { get; set; }
@@ -16,10 +17,18 @@ namespace MediaBrowser.Controller.Dlna
{
Conditions = new List<ProfileCondition>();
AudioCodecs = new string[] { };
VideoCodecs = new string[] { };
Containers = new string[] { };
}
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();
}
}
public enum DlnaProfileType