mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Re-enable throttler for HWA and Copy
This commit is contained in:
		
							parent
							
								
									4c178e9188
								
							
						
					
					
						commit
						5dbe16d3e6
					
				@ -663,18 +663,11 @@ namespace Jellyfin.Api.Helpers
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            var encodingOptions = _serverConfigurationManager.GetEncodingOptions();
 | 
					            var encodingOptions = _serverConfigurationManager.GetEncodingOptions();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // enable throttling when NOT using hardware acceleration
 | 
					 | 
				
			||||||
            if (string.IsNullOrEmpty(encodingOptions.HardwareAccelerationType))
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
            return state.InputProtocol == MediaProtocol.File &&
 | 
					            return state.InputProtocol == MediaProtocol.File &&
 | 
				
			||||||
                   state.RunTimeTicks.HasValue &&
 | 
					                   state.RunTimeTicks.HasValue &&
 | 
				
			||||||
                   state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
 | 
					                   state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks &&
 | 
				
			||||||
                   state.IsInputVideo &&
 | 
					                   state.IsInputVideo &&
 | 
				
			||||||
                       state.VideoType == VideoType.VideoFile &&
 | 
					                   state.VideoType == VideoType.VideoFile;
 | 
				
			||||||
                       !EncodingHelper.IsCopyCodec(state.OutputVideoCodec);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return false;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
 | 
				
			|||||||
@ -111,7 +111,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                        percent = 100.0 * currentMs / totalMs;
 | 
					                        percent = 100.0 * currentMs / totalMs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        transcodingPosition = val;
 | 
					                        transcodingPosition = TimeSpan.FromMilliseconds(currentMs);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else if (part.StartsWith("size=", StringComparison.OrdinalIgnoreCase))
 | 
					                else if (part.StartsWith("size=", StringComparison.OrdinalIgnoreCase))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user