mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-26 17:40:30 +01:00
Merge branch 'master' into Comment1
This commit is contained in:
@@ -38,7 +38,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
|
||||
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(
|
||||
container,
|
||||
width,
|
||||
height);
|
||||
|
||||
@@ -160,7 +161,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
|
||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(
|
||||
container,
|
||||
audioCodec,
|
||||
videoCodec,
|
||||
width,
|
||||
@@ -221,7 +223,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
private static string GetImageOrgPnValue(string container, int? width, int? height)
|
||||
{
|
||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||
.ResolveImageFormat(container,
|
||||
.ResolveImageFormat(
|
||||
container,
|
||||
width,
|
||||
height);
|
||||
|
||||
@@ -231,7 +234,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels)
|
||||
{
|
||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||
.ResolveAudioFormat(container,
|
||||
.ResolveAudioFormat(
|
||||
container,
|
||||
audioBitrate,
|
||||
audioSampleRate,
|
||||
audioChannels);
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
new ResolutionConfiguration(720, 950000),
|
||||
new ResolutionConfiguration(1280, 2500000),
|
||||
new ResolutionConfiguration(1920, 4000000),
|
||||
new ResolutionConfiguration(2560, 8000000),
|
||||
new ResolutionConfiguration(3840, 35000000)
|
||||
};
|
||||
|
||||
|
||||
@@ -455,9 +455,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (directPlayProfile == null)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, No direct play profiles found for Path: {1}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, No audio direct play profiles found for {1} with codec {2}",
|
||||
options.Profile.Name ?? "Unknown Profile",
|
||||
item.Path ?? "Unknown path");
|
||||
item.Path ?? "Unknown path",
|
||||
audioStream.Codec ?? "Unknown codec");
|
||||
|
||||
return (Enumerable.Empty<PlayMethod>(), GetTranscodeReasonsFromDirectPlayProfile(item, null, audioStream, options.Profile.DirectPlayProfiles));
|
||||
}
|
||||
@@ -498,7 +500,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (playMethods.Count > 0)
|
||||
{
|
||||
transcodeReasons.Clear();
|
||||
@@ -679,7 +680,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
||||
|
||||
_logger.LogInformation("Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||
options.Profile.Name ?? "Unknown Profile",
|
||||
item.Path ?? "Unknown path",
|
||||
isEligibleForDirectPlay,
|
||||
@@ -973,9 +975,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (directPlay == null)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, No direct play profiles found for Path: {1}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, No video direct play profiles found for {1} with codec {2}",
|
||||
profile.Name ?? "Unknown Profile",
|
||||
mediaSource.Path ?? "Unknown path");
|
||||
mediaSource.Path ?? "Unknown path",
|
||||
videoStream.Codec ?? "Unknown codec");
|
||||
|
||||
return (null, GetTranscodeReasonsFromDirectPlayProfile(mediaSource, videoStream, audioStream, profile.DirectPlayProfiles));
|
||||
}
|
||||
@@ -1136,7 +1140,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
private void LogConditionFailure(DeviceProfile profile, string type, ProfileCondition condition, MediaSourceInfo mediaSource)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
||||
type,
|
||||
profile.Name ?? "Unknown Profile",
|
||||
condition.Property,
|
||||
@@ -1341,7 +1346,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (itemBitrate > requestedMaxBitrate)
|
||||
{
|
||||
_logger.LogInformation("Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
||||
_logger.LogInformation(
|
||||
"Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
||||
playMethod, itemBitrate, requestedMaxBitrate);
|
||||
return false;
|
||||
}
|
||||
@@ -1431,6 +1437,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.AudioChannels:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1466,6 +1473,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.IsAvc:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
@@ -1487,6 +1495,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.IsAnamorphic:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
@@ -1508,6 +1517,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.IsInterlaced:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1539,6 +1549,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.AudioProfile:
|
||||
case ProfileConditionValue.Has64BitOffsets:
|
||||
case ProfileConditionValue.PacketLength:
|
||||
@@ -1550,6 +1561,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
// Not supported yet
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.RefFrames:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1585,6 +1597,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.VideoBitDepth:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1620,6 +1633,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.VideoProfile:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1643,6 +1657,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.Height:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
@@ -1668,6 +1683,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.VideoBitrate:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
@@ -1693,6 +1709,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.VideoFramerate:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
@@ -1718,6 +1735,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.VideoLevel:
|
||||
{
|
||||
if (string.IsNullOrEmpty(qualifier))
|
||||
@@ -1743,6 +1761,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ProfileConditionValue.Width:
|
||||
{
|
||||
if (!enableNonQualifiedConditions)
|
||||
|
||||
@@ -276,7 +276,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
list.Add(new NameValuePair("SubtitleMethod", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? item.SubtitleDeliveryMethod.ToString() : string.Empty));
|
||||
|
||||
|
||||
if (!item.IsDirectStream)
|
||||
{
|
||||
if (item.RequireNonAnamorphic)
|
||||
|
||||
Reference in New Issue
Block a user