update hls params
This commit is contained in:
parent
552e21b864
commit
b578877ac4
|
@ -309,13 +309,6 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected bool IsLiveStream(StreamState state)
|
||||
{
|
||||
var isLiveStream = (state.RunTimeTicks ?? 0) == 0;
|
||||
|
||||
return isLiveStream;
|
||||
}
|
||||
|
||||
public BaseHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IAuthorizationContext authorizationContext) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, authorizationContext)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -521,7 +521,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
|
||||
builder.AppendLine("#EXTM3U");
|
||||
|
||||
var isLiveStream = IsLiveStream(state);
|
||||
var isLiveStream = state.IsSegmentedLiveStream;
|
||||
|
||||
var queryStringIndex = Request.RawUrl.IndexOf('?');
|
||||
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);
|
||||
|
|
|
@ -89,17 +89,25 @@ namespace MediaBrowser.Api.Playback
|
|||
return 10;
|
||||
}
|
||||
|
||||
if (!RunTimeTicks.HasValue)
|
||||
if (IsSegmentedLiveStream)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSegmentedLiveStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
|
||||
}
|
||||
}
|
||||
|
||||
public int HlsListSize
|
||||
{
|
||||
get
|
||||
|
@ -119,8 +127,9 @@ namespace MediaBrowser.Api.Playback
|
|||
public List<string> SupportedAudioCodecs { get; set; }
|
||||
public List<string> SupportedVideoCodecs { get; set; }
|
||||
public string UserAgent { get; set; }
|
||||
public TranscodingJobType TranscodingType { get; set; }
|
||||
|
||||
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger)
|
||||
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType)
|
||||
{
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
_logger = logger;
|
||||
|
@ -128,6 +137,7 @@ namespace MediaBrowser.Api.Playback
|
|||
SupportedVideoCodecs = new List<string>();
|
||||
PlayableStreamFileNames = new List<string>();
|
||||
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
TranscodingType = transcodingType;
|
||||
}
|
||||
|
||||
public string InputAudioSync { get; set; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user