update dlna profiles

This commit is contained in:
Luke Pulverenti
2015-02-06 22:25:23 -05:00
parent 7320567b9e
commit 504e2099e2
31 changed files with 125 additions and 102 deletions

View File

@@ -47,6 +47,17 @@ namespace MediaBrowser.Model.Dlna
/// <value>The audio transcoding bitrate.</value>
public int? AudioTranscodingBitrate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports direct remote content].
/// </summary>
/// <value><c>true</c> if [supports direct remote content]; otherwise, <c>false</c>.</value>
public bool SupportsDirectRemoteContent { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports custom HTTP headers].
/// </summary>
/// <value><c>true</c> if [supports custom HTTP headers]; otherwise, <c>false</c>.</value>
public bool SupportsCustomHttpHeaders { get; set; }
/// <summary>
/// Gets the maximum bitrate.
/// </summary>

View File

@@ -76,8 +76,6 @@ namespace MediaBrowser.Model.Dlna
public bool RequiresPlainVideoItems { get; set; }
public bool RequiresPlainFolders { get; set; }
public bool SupportsDirectRemoteContent { get; set; }
public bool SupportsCustomHttpHeaders { get; set; }
public bool EnableMSMediaReceiverRegistrar { get; set; }
public XmlAttribute[] XmlRootAttributes { get; set; }

View File

@@ -258,7 +258,7 @@ namespace MediaBrowser.Model.Dlna
if (IsEligibleForDirectPlay(item, maxBitrateSetting, subtitleStream, options))
{
// See if it can be direct played
var directPlay = GetVideoDirectPlayProfile(options.Profile, item, videoStream, audioStream);
var directPlay = GetVideoDirectPlayProfile(options, options.Profile, item, videoStream, audioStream);
if (directPlay != null)
{
@@ -380,7 +380,8 @@ namespace MediaBrowser.Model.Dlna
return 128000;
}
private PlayMethod? GetVideoDirectPlayProfile(DeviceProfile profile,
private PlayMethod? GetVideoDirectPlayProfile(VideoOptions options,
DeviceProfile profile,
MediaSourceInfo mediaSource,
MediaStream videoStream,
MediaStream audioStream)
@@ -504,12 +505,12 @@ namespace MediaBrowser.Model.Dlna
if (mediaSource.Protocol == MediaProtocol.Http)
{
if (!profile.SupportsDirectRemoteContent)
if (!options.SupportsDirectRemoteContent)
{
return null;
}
if (mediaSource.RequiredHttpHeaders.Count > 0 && !profile.SupportsCustomHttpHeaders)
if (mediaSource.RequiredHttpHeaders.Count > 0 && !options.SupportsCustomHttpHeaders)
{
return null;
}