diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-24 09:37:44 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-24 09:37:44 -0700 |
| commit | 38a0af6e86d3bdf8794343b03d26659d4bf89093 (patch) | |
| tree | f3c92b89ae3e8a7e744ee13eb1b16139da690622 /MediaBrowser.Controller | |
| parent | 543ce24c1051d10b32c0dae5277ee37c27daceae (diff) | |
| parent | 501dedb13cd59dc2683ac4192cd11289bd304cfb (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Dlna/CodecProfile.cs | 18 | ||||
| -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 | 11 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/DirectPlayProfile.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/MediaProfile.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/TranscodingProfile.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaBrowser.Controller.csproj | 1 |
8 files changed, 81 insertions, 21 deletions
diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.cs index bff3742988..5621c7ef23 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() @@ -32,6 +32,12 @@ namespace MediaBrowser.Controller.Dlna public ProfileConditionType Condition { get; set; } public ProfileConditionValue Property { get; set; } public string Value { get; set; } + public bool IsRequired { get; set; } + + public ProfileCondition() + { + IsRequired = true; + } } public enum ProfileConditionType @@ -46,11 +52,17 @@ namespace MediaBrowser.Controller.Dlna { AudioChannels, AudioBitrate, + AudioProfile, Filesize, Width, Height, + Has64BitOffsets, + VideoBitDepth, VideoBitrate, VideoFramerate, - VideoLevel + VideoLevel, + VideoPacketLength, + VideoProfile, + VideoTimestamp } } diff --git a/MediaBrowser.Controller/Dlna/ContainerProfile.cs b/MediaBrowser.Controller/Dlna/ContainerProfile.cs new file mode 100644 index 0000000000..3bd3c9eaf6 --- /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 20c94ad50b..461c77537c 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 91be73bba8..f3de1bc34a 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,9 @@ namespace MediaBrowser.Controller.Dlna public string ModelDescription { get; set; } public string ModelNumber { get; set; } public string ModelUrl { get; set; } + public bool IgnoreTranscodeByteRangeRequests { get; set; } + public bool SupportsAlbumArtInDidl { get; set; } + /// <summary> /// Controls the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace. /// </summary> @@ -60,12 +65,16 @@ namespace MediaBrowser.Controller.Dlna public int TimelineOffsetSeconds { get; set; } + 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 53d32a2f8d..686b31287e 100644 --- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs @@ -5,19 +5,15 @@ namespace MediaBrowser.Controller.Dlna { public class DirectPlayProfile { - public string[] Containers { get; set; } + public string Container { 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() + public List<string> GetContainers() { - Conditions = new List<ProfileCondition>(); - - Containers = new string[] { }; + return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); } public List<string> GetAudioCodecs() diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.cs index 5fa41b18aa..1d2613face 100644 --- a/MediaBrowser.Controller/Dlna/MediaProfile.cs +++ b/MediaBrowser.Controller/Dlna/MediaProfile.cs @@ -13,6 +13,13 @@ namespace MediaBrowser.Controller.Dlna public string OrgPn { get; set; } public string MimeType { get; set; } + public ProfileCondition[] Conditions { get; set; } + + public MediaProfile() + { + Conditions = new ProfileCondition[] {}; + } + public List<string> GetAudioCodecs() { return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs index 530a44b8ca..1ce2adb1ba 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 @@ -11,12 +10,18 @@ namespace MediaBrowser.Controller.Dlna public string VideoCodec { get; set; } public string AudioCodec { get; set; } - public List<TranscodingSetting> Settings { get; set; } + public bool EstimateContentLength { get; set; } + + public TranscodeSeekInfo TranscodeSeekInfo { get; set; } + + public TranscodingSetting[] Settings { get; set; } public TranscodingProfile() { - Settings = new List<TranscodingSetting>(); + Settings = new TranscodingSetting[] { }; } + + public bool EnableMpegtsM2TsMode { get; set; } } public class TranscodingSetting @@ -27,6 +32,14 @@ namespace MediaBrowser.Controller.Dlna public enum TranscodingSettingType { - Profile + VideoLevel = 0, + VideoProfile = 1, + MaxAudioChannels = 2 + } + + public enum TranscodeSeekInfo + { + Auto = 0, + Bytes = 1 } } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index b51824bdb9..5e6297d060 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -79,6 +79,7 @@ <Compile Include="Collections\CollectionCreationOptions.cs" /> <Compile Include="Collections\ICollectionManager.cs" /> <Compile Include="Dlna\CodecProfile.cs" /> + <Compile Include="Dlna\ContainerProfile.cs" /> <Compile Include="Dlna\DeviceIdentification.cs" /> <Compile Include="Dlna\DirectPlayProfile.cs" /> <Compile Include="Dlna\IDlnaManager.cs" /> |
