diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-23 12:42:02 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-23 12:42:02 -0400 |
| commit | 85aa11e926ae9cba2ad58bf1087ad6efaff925a3 (patch) | |
| tree | 0255278477768f110f8570087fd429a8e24a71f2 /MediaBrowser.Controller/Dlna | |
| parent | e0c60dc29ade31bb29501562126d3cc55c8eb881 (diff) | |
separate profiles
Diffstat (limited to 'MediaBrowser.Controller/Dlna')
| -rw-r--r-- | MediaBrowser.Controller/Dlna/CodecProfile.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/ContainerProfile.cs | 22 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DeviceIdentification.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DeviceProfile.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DirectPlayProfile.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/TranscodingProfile.cs | 9 |
6 files changed, 41 insertions, 20 deletions
diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.cs index 0d66d90ae..1dc7f2139 100644 --- a/MediaBrowser.Controller/Dlna/CodecProfile.cs +++ b/MediaBrowser.Controller/Dlna/CodecProfile.cs @@ -6,12 +6,12 @@ namespace MediaBrowser.Controller.Dlna public class CodecProfile { public CodecType Type { get; set; } - public List<ProfileCondition> Conditions { get; set; } + public ProfileCondition[] Conditions { get; set; } public string Codec { get; set; } public CodecProfile() { - Conditions = new List<ProfileCondition>(); + Conditions = new ProfileCondition[] {}; } public List<string> GetCodecs() diff --git a/MediaBrowser.Controller/Dlna/ContainerProfile.cs b/MediaBrowser.Controller/Dlna/ContainerProfile.cs new file mode 100644 index 000000000..3bd3c9eaf --- /dev/null +++ b/MediaBrowser.Controller/Dlna/ContainerProfile.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Linq; + +namespace MediaBrowser.Controller.Dlna +{ + public class ContainerProfile + { + public DlnaProfileType Type { get; set; } + public ProfileCondition[] Conditions { get; set; } + public string Container { get; set; } + + public ContainerProfile() + { + Conditions = new ProfileCondition[] { }; + } + + public List<string> GetContainers() + { + return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); + } + } +} diff --git a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs index 20c94ad50..461c77537 100644 --- a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs +++ b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; - + namespace MediaBrowser.Controller.Dlna { public class DeviceIdentification @@ -55,11 +54,11 @@ namespace MediaBrowser.Controller.Dlna /// Gets or sets the headers. /// </summary> /// <value>The headers.</value> - public List<HttpHeaderInfo> Headers { get; set; } + public HttpHeaderInfo[] Headers { get; set; } public DeviceIdentification() { - Headers = new List<HttpHeaderInfo>(); + Headers = new HttpHeaderInfo[] {}; } } @@ -73,6 +72,7 @@ namespace MediaBrowser.Controller.Dlna public enum HeaderMatchType { Equals = 0, - Substring = 1 + Regex = 1, + Substring = 2 } } diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs index 49568e7d4..83500e407 100644 --- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs @@ -20,13 +20,15 @@ namespace MediaBrowser.Controller.Dlna /// </summary> /// <value>The transcoding profiles.</value> public TranscodingProfile[] TranscodingProfiles { get; set; } - + /// <summary> /// Gets or sets the direct play profiles. /// </summary> /// <value>The direct play profiles.</value> public DirectPlayProfile[] DirectPlayProfiles { get; set; } + public ContainerProfile[] ContainerProfiles { get; set; } + /// <summary> /// Gets or sets the identification. /// </summary> @@ -40,6 +42,8 @@ namespace MediaBrowser.Controller.Dlna public string ModelDescription { get; set; } public string ModelNumber { get; set; } public string ModelUrl { get; set; } + public bool IgnoreTranscodeByteRangeRequests { get; set; } + /// <summary> /// Controls the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace. /// </summary> @@ -62,13 +66,14 @@ namespace MediaBrowser.Controller.Dlna public bool RequiresPlainVideoItems { get; set; } public bool RequiresPlainFolders { get; set; } - + public DeviceProfile() { DirectPlayProfiles = new DirectPlayProfile[] { }; TranscodingProfiles = new TranscodingProfile[] { }; MediaProfiles = new MediaProfile[] { }; CodecProfiles = new CodecProfile[] { }; + ContainerProfiles = new ContainerProfile[] { }; } } } diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs index 56dd15ca3..686b31287 100644 --- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs @@ -11,13 +11,6 @@ namespace MediaBrowser.Controller.Dlna public DlnaProfileType Type { get; set; } - public List<ProfileCondition> Conditions { get; set; } - - public DirectPlayProfile() - { - Conditions = new List<ProfileCondition>(); - } - public List<string> GetContainers() { return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs index 32ffb91cf..1ce2adb1b 100644 --- a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; - + namespace MediaBrowser.Controller.Dlna { public class TranscodingProfile @@ -15,12 +14,14 @@ namespace MediaBrowser.Controller.Dlna public TranscodeSeekInfo TranscodeSeekInfo { get; set; } - public List<TranscodingSetting> Settings { get; set; } + public TranscodingSetting[] Settings { get; set; } public TranscodingProfile() { - Settings = new List<TranscodingSetting>(); + Settings = new TranscodingSetting[] { }; } + + public bool EnableMpegtsM2TsMode { get; set; } } public class TranscodingSetting |
