From 1ad990ad720931309afadd9f7912d66595dcc04e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 19 Aug 2017 15:43:35 -0400 Subject: update live tv data transfer --- MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs') diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index b552579a8..c2ce96979 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.MediaEncoding public string MediaPath { get; set; } public bool IsInputVideo { get; set; } public IIsoMount IsoMount { get; set; } - public List PlayableStreamFileNames { get; set; } + public string[] PlayableStreamFileNames { get; set; } public string OutputAudioCodec { get; set; } public int? OutputVideoBitrate { get; set; } public MediaStream SubtitleStream { get; set; } @@ -42,8 +42,8 @@ namespace MediaBrowser.Controller.MediaEncoding public bool ReadInputAtNativeFramerate { get; set; } - private List _transcodeReasons = null; - public List TranscodeReasons + private TranscodeReason[] _transcodeReasons = null; + public TranscodeReason[] TranscodeReasons { get { @@ -53,7 +53,7 @@ namespace MediaBrowser.Controller.MediaEncoding .Split(',') .Where(i => !string.IsNullOrWhiteSpace(i)) .Select(v => (TranscodeReason)Enum.Parse(typeof(TranscodeReason), v, true)) - .ToList(); + .ToArray(); } return _transcodeReasons; @@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.MediaEncoding _logger = logger; TranscodingType = jobType; RemoteHttpHeaders = new Dictionary(StringComparer.OrdinalIgnoreCase); - PlayableStreamFileNames = new List(); + PlayableStreamFileNames = new string[]{}; SupportedAudioCodecs = new List(); SupportedVideoCodecs = new List(); SupportedSubtitleCodecs = new List(); -- cgit v1.2.3 From af02f9d692a74749921815ab356c1180fcae6f08 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 23 Aug 2017 14:44:40 -0400 Subject: add mpdecimate option --- Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs | 1 + MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 10 ++++++++++ MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 5 +++++ MediaBrowser.Model/Dto/MediaSourceInfo.cs | 1 + MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 1 + 5 files changed, 18 insertions(+) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs') diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs index 1bc334f06..eac845579 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs @@ -165,6 +165,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts RequiresOpening = true, RequiresClosing = true, RequiresLooping = info.EnableStreamLooping, + EnableMpDecimate = info.EnableMpDecimate, ReadAtNativeFramerate = false, diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index d99103852..736f1b32f 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -778,6 +778,11 @@ namespace MediaBrowser.Controller.MediaEncoding return false; } + if (state.EnableMpDecimate) + { + return false; + } + if (videoStream.IsInterlaced) { if (request.DeInterlace) @@ -1449,6 +1454,11 @@ namespace MediaBrowser.Controller.MediaEncoding } } + if (state.EnableMpDecimate) + { + filters.Add("mpdecimate,setpts=N/FRAME_RATE/TB"); + } + if (filters.Count > 0) { output += string.Format(" -vf \"{0}\"", string.Join(",", filters.ToArray())); diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index c2ce96979..e76217fda 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -127,6 +127,11 @@ namespace MediaBrowser.Controller.MediaEncoding } } + public bool EnableMpDecimate + { + get { return MediaSource.EnableMpDecimate; } + } + public string AlbumCoverPath { get; set; } public string InputAudioSync { get; set; } diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 488b1e7a8..8f3f0648d 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -41,6 +41,7 @@ namespace MediaBrowser.Model.Dto public string OpenToken { get; set; } public bool RequiresClosing { get; set; } public bool SupportsProbing { get; set; } + public bool EnableMpDecimate { get; set; } public string LiveStreamId { get; set; } public int? BufferMs { get; set; } diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index 15f60d831..2c2f22e86 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -47,6 +47,7 @@ namespace MediaBrowser.Model.LiveTv public bool ImportFavoritesOnly { get; set; } public bool AllowHWTranscoding { get; set; } public bool EnableStreamLooping { get; set; } + public bool EnableMpDecimate { get; set; } public bool EnableNewHdhrChannelIds { get; set; } public string Source { get; set; } -- cgit v1.2.3