Quellcode durchsuchen

add mpdecimate option

Luke Pulverenti vor 7 Jahren
Ursprung
Commit
af02f9d692

+ 1 - 0
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,
 

+ 10 - 0
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()));

+ 5 - 0
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; }

+ 1 - 0
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; }
 

+ 1 - 0
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; }