diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-08 14:59:49 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-08 14:59:49 -0500 |
| commit | 4941aa4d14f2a901890f91966c50f96308bb03ec (patch) | |
| tree | 75b1761b45d69430f8884de9b7ec5022baba7b51 /Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs | |
| parent | aba4933a5c7d80df44f546f1b9ae722a674e27ce (diff) | |
assume interlaced for external plugins
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs index 0313e6fde..2ee6869f6 100644 --- a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs +++ b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs @@ -6,6 +6,7 @@ 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 @@ -21,7 +22,7 @@ namespace Emby.Server.Implementations.LiveTv _logger = logger; } - public async Task AddMediaInfoWithProbe(MediaSourceInfo mediaSource, bool isAudio, CancellationToken cancellationToken) + public async Task AddMediaInfoWithProbe(MediaSourceInfo mediaSource, bool isAudio, bool assumeInterlaced, CancellationToken cancellationToken) { var originalRuntime = mediaSource.RunTimeTicks; @@ -95,6 +96,17 @@ namespace Emby.Server.Implementations.LiveTv videoStream.IsAVC = null; } + if (assumeInterlaced) + { + foreach (var mediaStream in mediaSource.MediaStreams) + { + if (mediaStream.Type == MediaStreamType.Video) + { + mediaStream.IsInterlaced = true; + } + } + } + // Try to estimate this mediaSource.InferTotalBitrate(true); } |
