diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-22 16:50:28 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-22 16:50:28 -0400 |
| commit | 9b294c8bc96b31f6c458cc47fa8d330be2df086a (patch) | |
| tree | a45f20a51af3842097e1ca98ff7653a6a8523675 /MediaBrowser.Controller/Dlna | |
| parent | e2c01947443379f38f55bc9fed223c92410b4e10 (diff) | |
add more codecs to direct play profiles
Diffstat (limited to 'MediaBrowser.Controller/Dlna')
| -rw-r--r-- | MediaBrowser.Controller/Dlna/CodecProfile.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DeviceProfile.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DirectPlayProfile.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/MediaProfile.cs | 20 |
4 files changed, 35 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.cs index f17805654..bff374298 100644 --- a/MediaBrowser.Controller/Dlna/CodecProfile.cs +++ b/MediaBrowser.Controller/Dlna/CodecProfile.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; namespace MediaBrowser.Controller.Dlna { @@ -6,12 +7,16 @@ namespace MediaBrowser.Controller.Dlna { public CodecType Type { get; set; } public List<ProfileCondition> Conditions { get; set; } - public string[] Codecs { get; set; } + public string Codec { get; set; } public CodecProfile() { Conditions = new List<ProfileCondition>(); - Codecs = new string[] { }; + } + + public List<string> GetCodecs() + { + return (Codec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); } } diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs index 179321a53..91be73bba 100644 --- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs @@ -58,6 +58,8 @@ namespace MediaBrowser.Controller.Dlna public MediaProfile[] MediaProfiles { get; set; } public CodecProfile[] CodecProfiles { get; set; } + public int TimelineOffsetSeconds { get; set; } + public DeviceProfile() { DirectPlayProfiles = new DirectPlayProfile[] { }; diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs index 29665cbec..53d32a2f8 100644 --- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs @@ -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 diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.cs index c237b1f91..5fa41b18a 100644 --- a/MediaBrowser.Controller/Dlna/MediaProfile.cs +++ b/MediaBrowser.Controller/Dlna/MediaProfile.cs @@ -1,20 +1,26 @@ - +using System.Collections.Generic; +using System.Linq; + namespace MediaBrowser.Controller.Dlna { public class MediaProfile { public string Container { 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; } public string OrgPn { get; set; } public string MimeType { get; set; } - public MediaProfile() + public List<string> GetAudioCodecs() + { + return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); + } + + public List<string> GetVideoCodecs() { - AudioCodecs = new string[] { }; - VideoCodecs = new string[] { }; + return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); } } } |
