|
|
|
@ -1231,22 +1231,28 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
|
|
|
|
|
private static bool IsSubtitleEmbedSupported(MediaStream subtitleStream, SubtitleProfile subtitleProfile, string transcodingSubProtocol, string transcodingContainer)
|
|
|
|
|
{
|
|
|
|
|
if (string.Equals(transcodingContainer, "ts", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(transcodingContainer))
|
|
|
|
|
{
|
|
|
|
|
var normalizedContainers = ContainerProfile.SplitValue(transcodingContainer);
|
|
|
|
|
|
|
|
|
|
if (ContainerProfile.ContainsContainer(normalizedContainers, "ts"))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (string.Equals(transcodingContainer, "mpegts", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (ContainerProfile.ContainsContainer(normalizedContainers, "mpegts"))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (string.Equals(transcodingContainer, "mp4", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (ContainerProfile.ContainsContainer(normalizedContainers, "mp4"))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (string.Equals(transcodingContainer, "mkv", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (ContainerProfile.ContainsContainer(normalizedContainers, "mkv") ||
|
|
|
|
|
ContainerProfile.ContainsContainer(normalizedContainers, "matroska"))
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -1572,6 +1578,8 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check audio codec
|
|
|
|
|
if (audioStream != null)
|
|
|
|
|
{
|
|
|
|
|
List<string> audioCodecs = profile.GetAudioCodecs();
|
|
|
|
|
if (audioCodecs.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -1582,6 +1590,7 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|