added new device profiles

This commit is contained in:
Luke Pulverenti
2014-07-16 23:17:14 -04:00
parent 21c3430ac4
commit e2052c771d
94 changed files with 3031 additions and 554 deletions

View File

@@ -29,5 +29,11 @@ namespace MediaBrowser.Model.Dlna
/// The application's configured quality setting
/// </summary>
public int? MaxBitrate { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
/// <value>The context.</value>
public EncodingContext Context { get; set; }
}
}

View File

@@ -89,6 +89,9 @@ namespace MediaBrowser.Model.Dlna
public CodecProfile[] CodecProfiles { get; set; }
public ResponseProfile[] ResponseProfiles { get; set; }
public SubtitleProfile[] SoftSubtitleProfiles { get; set; }
public SubtitleProfile[] ExternalSubtitleProfiles { get; set; }
public DeviceProfile()
{
DirectPlayProfiles = new DirectPlayProfile[] { };
@@ -97,6 +100,9 @@ namespace MediaBrowser.Model.Dlna
CodecProfiles = new CodecProfile[] { };
ContainerProfiles = new ContainerProfile[] { };
SoftSubtitleProfiles = new SubtitleProfile[] { };
ExternalSubtitleProfiles = new SubtitleProfile[] { };
XmlRootAttributes = new XmlAttribute[] { };
SupportedMediaTypes = "Audio,Photo,Video";

View File

@@ -171,7 +171,7 @@ namespace MediaBrowser.Model.Dlna
TranscodingProfile transcodingProfile = null;
foreach (TranscodingProfile i in options.Profile.TranscodingProfiles)
{
if (i.Type == playlistItem.MediaType)
if (i.Type == playlistItem.MediaType && i.Context == options.Context)
{
transcodingProfile = i;
break;
@@ -262,7 +262,7 @@ namespace MediaBrowser.Model.Dlna
TranscodingProfile transcodingProfile = null;
foreach (TranscodingProfile i in options.Profile.TranscodingProfiles)
{
if (i.Type == playlistItem.MediaType)
if (i.Type == playlistItem.MediaType && i.Context == options.Context)
{
transcodingProfile = i;
break;

View File

@@ -0,0 +1,8 @@

namespace MediaBrowser.Model.Dlna
{
public class SubtitleProfile
{
public string Format { get; set; }
}
}

View File

@@ -32,6 +32,9 @@ namespace MediaBrowser.Model.Dlna
[XmlAttribute("videoProfile")]
public string VideoProfile { get; set; }
[XmlAttribute("context")]
public EncodingContext Context { get; set; }
public List<string> GetAudioCodecs()
{
List<string> list = new List<string>();
@@ -42,4 +45,10 @@ namespace MediaBrowser.Model.Dlna
return list;
}
}
public enum EncodingContext
{
Streaming = 0,
Static = 1
}
}

View File

@@ -89,6 +89,7 @@
<Compile Include="Configuration\MetadataOptions.cs" />
<Compile Include="Configuration\MetadataPluginSummary.cs" />
<Compile Include="Configuration\MetadataPluginType.cs" />
<Compile Include="Dlna\SubtitleProfile.cs" />
<Compile Include="Notifications\NotificationOption.cs" />
<Compile Include="Notifications\NotificationOptions.cs" />
<Compile Include="Notifications\NotificationType.cs" />

View File

@@ -7,5 +7,6 @@
public const string ASS = "ass";
public const string VTT = "vtt";
public const string SUB = "sub";
public const string SMI = "smi";
}
}