separate profiles

This commit is contained in:
Luke Pulverenti
2014-03-23 12:42:02 -04:00
parent e0c60dc29a
commit 85aa11e926
24 changed files with 2187 additions and 1097 deletions

View File

@@ -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()

View File

@@ -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();
}
}
}

View File

@@ -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
}
}

View File

@@ -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[] { };
}
}
}

View File

@@ -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();

View File

@@ -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

View File

@@ -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" />