aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
blob: 53d32a2f8d30ab8257fcc50c3f3f8be71ee54db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Collections.Generic;
using System.Linq;

namespace MediaBrowser.Controller.Dlna
{
    public class DirectPlayProfile
    {
        public string[] Containers { get; set; }
        public string AudioCodec { get; set; }
        public string VideoCodec { get; set; }

        public DlnaProfileType Type { get; set; }

        public List<ProfileCondition> Conditions { get; set; }

        public DirectPlayProfile()
        {
            Conditions = new List<ProfileCondition>();

            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
    {
        Audio = 0,
        Video = 1,
        Photo = 2
    }
}