aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/StreamBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Dlna/StreamBuilder.cs')
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 3c1c7ea6d..340af3ac1 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -148,6 +148,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!conditionProcessor.IsAudioConditionSatisfied(c, audioChannels, audioBitrate))
{
+ LogConditionFailure(options.Profile, "AudioCodecProfile", c, item);
all = false;
break;
}
@@ -274,14 +275,21 @@ namespace MediaBrowser.Model.Dlna
{
playMethods.Add(PlayMethod.DirectStream);
}
-
+
// The profile describes what the device supports
// If device requirements are satisfied then allow both direct stream and direct play
- if (item.SupportsDirectPlay && IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options)))
+ if (item.SupportsDirectPlay &&
+ IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options)))
{
playMethods.Add(PlayMethod.DirectPlay);
}
}
+ else
+ {
+ _logger.Debug("Profile: {0}, No direct play profiles found for Path: {1}",
+ options.Profile.Name ?? "Unknown Profile",
+ item.Path ?? "Unknown path");
+ }
return playMethods;
}
@@ -745,10 +753,9 @@ namespace MediaBrowser.Model.Dlna
}
}
+ // Look for supported embedded subs that we can just mux into the output
foreach (SubtitleProfile profile in subtitleProfiles)
{
- bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format);
-
if (!profile.SupportsLanguage(subtitleStream.Language))
{
continue;
@@ -756,11 +763,6 @@ namespace MediaBrowser.Model.Dlna
if (profile.Method == SubtitleDeliveryMethod.Embed && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
{
- if (!requiresConversion)
- {
- return profile;
- }
-
return profile;
}
}
@@ -774,8 +776,13 @@ namespace MediaBrowser.Model.Dlna
private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, int? maxBitrate)
{
- // Honor the max bitrate setting
- return !maxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= maxBitrate.Value);
+ if (!maxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= maxBitrate.Value))
+ {
+ return true;
+ }
+
+ _logger.Debug("Audio Bitrate exceeds DirectPlay limit");
+ return false;
}
private void ValidateInput(VideoOptions options)