reduce AnalyzeDurationMs for live tv

This commit is contained in:
Luke Pulverenti
2017-03-05 10:38:36 -05:00
parent 8b77a89373
commit ce3f2bdd20
11 changed files with 69 additions and 78 deletions

View File

@@ -491,7 +491,7 @@ namespace Emby.Server.Implementations.Dto
}
}
if (!(item is LiveTvProgram))
if (!(item is LiveTvProgram) || fields.Contains(ItemFields.PlayAccess))
{
dto.PlayAccess = item.GetPlayAccess(user);
}

View File

@@ -425,8 +425,7 @@ namespace Emby.Server.Implementations.Library
if (parent != null)
{
await parent.ValidateChildren(new Progress<double>(), CancellationToken.None)
.ConfigureAwait(false);
await parent.ValidateChildren(new Progress<double>(), CancellationToken.None, new MetadataRefreshOptions(_fileSystem), false) .ConfigureAwait(false);
}
}
else if (parent != null)

View File

@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
namespace Emby.Server.Implementations.LiveTv
@@ -16,6 +15,8 @@ namespace Emby.Server.Implementations.LiveTv
private readonly IMediaEncoder _mediaEncoder;
private readonly ILogger _logger;
const int AnalyzeDurationMs = 2000;
public LiveStreamHelper(IMediaEncoder mediaEncoder, ILogger logger)
{
_mediaEncoder = mediaEncoder;
@@ -34,7 +35,7 @@ namespace Emby.Server.Implementations.LiveTv
Protocol = mediaSource.Protocol,
MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video,
ExtractChapters = false,
AnalyzeDurationSections = 2
AnalyzeDurationMs = AnalyzeDurationMs
}, cancellationToken).ConfigureAwait(false);
@@ -98,6 +99,8 @@ namespace Emby.Server.Implementations.LiveTv
// Try to estimate this
mediaSource.InferTotalBitrate(true);
mediaSource.AnalyzeDurationMs = AnalyzeDurationMs;
}
}
}

View File

@@ -40,7 +40,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
_sharedBuffer.Enqueue(copy);
while (_sharedBuffer.Count > 3000)
while (_sharedBuffer.Count > 10000)
{
byte[] bytes;
_sharedBuffer.TryDequeue(out bytes);