|
|
|
@ -491,14 +491,9 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
var videoSupported = false;
|
|
|
|
|
|
|
|
|
|
foreach (var profile in directPlayProfiles)
|
|
|
|
|
{
|
|
|
|
|
if (profile.Container.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
// Check container type
|
|
|
|
|
string mediaContainer = item.Container ?? string.Empty;
|
|
|
|
|
foreach (string i in profile.GetContainers())
|
|
|
|
|
{
|
|
|
|
|
if (StringHelper.EqualsIgnoreCase(i, mediaContainer))
|
|
|
|
|
if (profile.SupportsContainer(item.Container))
|
|
|
|
|
{
|
|
|
|
|
containerSupported = true;
|
|
|
|
|
|
|
|
|
@ -539,8 +534,6 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!containerSupported)
|
|
|
|
|
{
|
|
|
|
@ -1537,25 +1530,12 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool IsAudioDirectPlaySupported(DirectPlayProfile profile, MediaSourceInfo item, MediaStream audioStream)
|
|
|
|
|
{
|
|
|
|
|
if (profile.Container.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
// Check container type
|
|
|
|
|
string mediaContainer = item.Container ?? string.Empty;
|
|
|
|
|
bool any = false;
|
|
|
|
|
foreach (string i in profile.GetContainers())
|
|
|
|
|
{
|
|
|
|
|
if (StringHelper.EqualsIgnoreCase(i, mediaContainer))
|
|
|
|
|
{
|
|
|
|
|
any = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!any)
|
|
|
|
|
if (!profile.SupportsContainer(item.Container))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check audio codec
|
|
|
|
|
List<string> audioCodecs = profile.GetAudioCodecs();
|
|
|
|
@ -1573,25 +1553,12 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool IsVideoDirectPlaySupported(DirectPlayProfile profile, MediaSourceInfo item, MediaStream videoStream, MediaStream audioStream)
|
|
|
|
|
{
|
|
|
|
|
if (profile.Container.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
// Check container type
|
|
|
|
|
string mediaContainer = item.Container ?? string.Empty;
|
|
|
|
|
bool any = false;
|
|
|
|
|
foreach (string i in profile.GetContainers())
|
|
|
|
|
{
|
|
|
|
|
if (StringHelper.EqualsIgnoreCase(i, mediaContainer))
|
|
|
|
|
{
|
|
|
|
|
any = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!any)
|
|
|
|
|
if (!profile.SupportsContainer(item.Container))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check video codec
|
|
|
|
|
List<string> videoCodecs = profile.GetVideoCodecs();
|
|
|
|
|