diff options
Diffstat (limited to 'MediaBrowser.Controller')
6 files changed, 41 insertions, 57 deletions
diff --git a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs index 4ccba1106..20c94ad50 100644 --- a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs +++ b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs @@ -67,5 +67,12 @@ namespace MediaBrowser.Controller.Dlna { public string Name { get; set; } public string Value { get; set; } + public HeaderMatchType Match { get; set; } + } + + public enum HeaderMatchType + { + Equals = 0, + Substring = 1 } } diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs index ca5929d13..bdcfc009a 100644 --- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs @@ -55,10 +55,13 @@ namespace MediaBrowser.Controller.Dlna public string ProtocolInfo { get; set; } + public MediaProfile[] MediaProfiles { get; set; } + public DeviceProfile() { DirectPlayProfiles = new DirectPlayProfile[] { }; TranscodingProfiles = new TranscodingProfile[] { }; + MediaProfiles = new MediaProfile[] { }; } } } diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs index 4b9a43867..c11180aeb 100644 --- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs @@ -1,60 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using System.Xml.Serialization; +using System.Collections.Generic; namespace MediaBrowser.Controller.Dlna { public class DirectPlayProfile { - public string Container { get; set; } - public string AudioCodec { get; set; } - public string VideoCodec { get; set; } + public string[] Containers { get; set; } + public string[] AudioCodecs { get; set; } + public string[] VideoCodecs { get; set; } - [IgnoreDataMember] - [XmlIgnore] - public string[] Containers - { - get - { - return (Container ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - } - set - { - Container = value == null ? null : string.Join(",", value); - } - } - - [IgnoreDataMember] - [XmlIgnore] - public string[] AudioCodecs - { - get - { - return (AudioCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - } - set - { - AudioCodec = value == null ? null : string.Join(",", value); - } - } - - [IgnoreDataMember] - [XmlIgnore] - public string[] VideoCodecs - { - get - { - return (VideoCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - } - set - { - VideoCodec = value == null ? null : string.Join(",", value); - } - } - - public string OrgPn { get; set; } - public string MimeType { get; set; } public DlnaProfileType Type { get; set; } public List<ProfileCondition> Conditions { get; set; } @@ -62,6 +15,10 @@ namespace MediaBrowser.Controller.Dlna public DirectPlayProfile() { Conditions = new List<ProfileCondition>(); + + AudioCodecs = new string[] { }; + VideoCodecs = new string[] { }; + Containers = new string[] { }; } } @@ -95,6 +52,7 @@ namespace MediaBrowser.Controller.Dlna VideoWidth, VideoHeight, VideoBitrate, - VideoFramerate + VideoFramerate, + VideoLevel } } diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.cs new file mode 100644 index 000000000..c237b1f91 --- /dev/null +++ b/MediaBrowser.Controller/Dlna/MediaProfile.cs @@ -0,0 +1,20 @@ + +namespace MediaBrowser.Controller.Dlna +{ + public class MediaProfile + { + public string Container { get; set; } + public string[] AudioCodecs { get; set; } + public string[] VideoCodecs { get; set; } + + public DlnaProfileType Type { get; set; } + public string OrgPn { get; set; } + public string MimeType { get; set; } + + public MediaProfile() + { + AudioCodecs = new string[] { }; + VideoCodecs = new string[] { }; + } + } +} diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs index 3b0a513d1..530a44b8c 100644 --- a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs @@ -8,12 +8,7 @@ namespace MediaBrowser.Controller.Dlna public DlnaProfileType Type { get; set; } - public string MimeType { get; set; } - - public string OrgPn { get; set; } - public string VideoCodec { get; set; } - public string AudioCodec { get; set; } public List<TranscodingSetting> Settings { get; set; } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index ac178ff53..778abadb1 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -82,6 +82,7 @@ <Compile Include="Dlna\DirectPlayProfile.cs" /> <Compile Include="Dlna\IDlnaManager.cs" /> <Compile Include="Dlna\DeviceProfile.cs" /> + <Compile Include="Dlna\MediaProfile.cs" /> <Compile Include="Dlna\TranscodingProfile.cs" /> <Compile Include="Drawing\IImageProcessor.cs" /> <Compile Include="Drawing\ImageFormat.cs" /> |
