mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-28 03:18:27 +01:00
Merge pull request #7325 from eyezak/issue/6450
This commit is contained in:
@@ -27,6 +27,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
public bool ForceDirectStream { get; set; }
|
||||
|
||||
public bool AllowAudioStreamCopy { get; set; }
|
||||
|
||||
public Guid ItemId { get; set; }
|
||||
|
||||
public MediaSourceInfo[] MediaSources { get; set; }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
AudioCodecs = Array.Empty<string>();
|
||||
VideoCodecs = Array.Empty<string>();
|
||||
SubtitleCodecs = Array.Empty<string>();
|
||||
TranscodeReasons = Array.Empty<TranscodeReason>();
|
||||
StreamOptions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
@@ -103,7 +102,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
public string PlaySessionId { get; set; }
|
||||
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
public TranscodeReason TranscodeReasons { get; set; }
|
||||
|
||||
public Dictionary<string, string> StreamOptions { get; private set; }
|
||||
|
||||
@@ -799,7 +798,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (!item.IsDirectStream)
|
||||
{
|
||||
list.Add(new NameValuePair("TranscodeReasons", string.Join(',', item.TranscodeReasons.Distinct())));
|
||||
list.Add(new NameValuePair("TranscodeReasons", item.TranscodeReasons.ToString()));
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
@@ -10,5 +10,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
|
||||
public bool AllowVideoStreamCopy { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace MediaBrowser.Model.Dto
|
||||
public int? AnalyzeDurationMs { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
public TranscodeReason TranscodeReasons { get; set; }
|
||||
|
||||
public int? DefaultAudioStreamIndex { get; set; }
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace MediaBrowser.Model.Dto
|
||||
|
||||
public MediaStream GetDefaultAudioStream(int? defaultIndex)
|
||||
{
|
||||
if (defaultIndex.HasValue)
|
||||
if (defaultIndex.HasValue && defaultIndex != -1)
|
||||
{
|
||||
var val = defaultIndex.Value;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
[assembly: InternalsVisibleTo("Jellyfin.Model.Tests")]
|
||||
[assembly: InternalsVisibleTo("Jellyfin.Dlna.Tests")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
|
||||
@@ -1,32 +1,44 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Session
|
||||
{
|
||||
[Flags]
|
||||
public enum TranscodeReason
|
||||
{
|
||||
ContainerNotSupported = 0,
|
||||
VideoCodecNotSupported = 1,
|
||||
AudioCodecNotSupported = 2,
|
||||
ContainerBitrateExceedsLimit = 3,
|
||||
AudioBitrateNotSupported = 4,
|
||||
AudioChannelsNotSupported = 5,
|
||||
VideoResolutionNotSupported = 6,
|
||||
UnknownVideoStreamInfo = 7,
|
||||
UnknownAudioStreamInfo = 8,
|
||||
AudioProfileNotSupported = 9,
|
||||
AudioSampleRateNotSupported = 10,
|
||||
AnamorphicVideoNotSupported = 11,
|
||||
InterlacedVideoNotSupported = 12,
|
||||
SecondaryAudioNotSupported = 13,
|
||||
RefFramesNotSupported = 14,
|
||||
VideoBitDepthNotSupported = 15,
|
||||
VideoBitrateNotSupported = 16,
|
||||
VideoFramerateNotSupported = 17,
|
||||
VideoLevelNotSupported = 18,
|
||||
VideoProfileNotSupported = 19,
|
||||
AudioBitDepthNotSupported = 20,
|
||||
SubtitleCodecNotSupported = 21,
|
||||
DirectPlayError = 22,
|
||||
AudioIsExternal = 23
|
||||
// Primary
|
||||
ContainerNotSupported = 1 << 0,
|
||||
VideoCodecNotSupported = 1 << 1,
|
||||
AudioCodecNotSupported = 1 << 2,
|
||||
SubtitleCodecNotSupported = 1 << 3,
|
||||
AudioIsExternal = 1 << 4,
|
||||
SecondaryAudioNotSupported = 1 << 5,
|
||||
|
||||
// Video Constraints
|
||||
VideoProfileNotSupported = 1 << 6,
|
||||
VideoLevelNotSupported = 1 << 7,
|
||||
VideoResolutionNotSupported = 1 << 8,
|
||||
VideoBitDepthNotSupported = 1 << 9,
|
||||
VideoFramerateNotSupported = 1 << 10,
|
||||
RefFramesNotSupported = 1 << 11,
|
||||
AnamorphicVideoNotSupported = 1 << 12,
|
||||
InterlacedVideoNotSupported = 1 << 13,
|
||||
|
||||
// Audio Constraints
|
||||
AudioChannelsNotSupported = 1 << 14,
|
||||
AudioProfileNotSupported = 1 << 15,
|
||||
AudioSampleRateNotSupported = 1 << 16,
|
||||
AudioBitDepthNotSupported = 1 << 17,
|
||||
|
||||
// Bitrate Constraints
|
||||
ContainerBitrateExceedsLimit = 1 << 18,
|
||||
VideoBitrateNotSupported = 1 << 19,
|
||||
AudioBitrateNotSupported = 1 << 20,
|
||||
|
||||
// Errors
|
||||
UnknownVideoStreamInfo = 1 << 21,
|
||||
UnknownAudioStreamInfo = 1 << 22,
|
||||
DirectPlayError = 1 << 23,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Session
|
||||
{
|
||||
public class TranscodingInfo
|
||||
{
|
||||
public TranscodingInfo()
|
||||
{
|
||||
TranscodeReasons = Array.Empty<TranscodeReason>();
|
||||
}
|
||||
|
||||
public string AudioCodec { get; set; }
|
||||
|
||||
public string VideoCodec { get; set; }
|
||||
@@ -36,6 +29,6 @@ namespace MediaBrowser.Model.Session
|
||||
|
||||
public HardwareEncodingType? HardwareAccelerationType { get; set; }
|
||||
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
public TranscodeReason TranscodeReason { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user