فهرست منبع

Re-enable throttler for HWA and Copy

nyanmisaka 3 سال پیش
والد
کامیت
5dbe16d3e6
2فایلهای تغییر یافته به همراه6 افزوده شده و 13 حذف شده
  1. 5 12
      Jellyfin.Api/Helpers/TranscodingJobHelper.cs
  2. 1 1
      MediaBrowser.Controller/MediaEncoding/JobLogger.cs

+ 5 - 12
Jellyfin.Api/Helpers/TranscodingJobHelper.cs

@@ -663,18 +663,11 @@ namespace Jellyfin.Api.Helpers
         {
             var encodingOptions = _serverConfigurationManager.GetEncodingOptions();
 
-            // enable throttling when NOT using hardware acceleration
-            if (string.IsNullOrEmpty(encodingOptions.HardwareAccelerationType))
-            {
-                return state.InputProtocol == MediaProtocol.File &&
-                       state.RunTimeTicks.HasValue &&
-                       state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
-                       state.IsInputVideo &&
-                       state.VideoType == VideoType.VideoFile &&
-                       !EncodingHelper.IsCopyCodec(state.OutputVideoCodec);
-            }
-
-            return false;
+            return state.InputProtocol == MediaProtocol.File &&
+                   state.RunTimeTicks.HasValue &&
+                   state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
+                   state.IsInputVideo &&
+                   state.VideoType == VideoType.VideoFile;
         }
 
         /// <summary>

+ 1 - 1
MediaBrowser.Controller/MediaEncoding/JobLogger.cs

@@ -111,7 +111,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 
                         percent = 100.0 * currentMs / totalMs;
 
-                        transcodingPosition = val;
+                        transcodingPosition = TimeSpan.FromMilliseconds(currentMs);
                     }
                 }
                 else if (part.StartsWith("size=", StringComparison.OrdinalIgnoreCase))