3.0.5597.1

This commit is contained in:
Luke Pulverenti
2015-04-29 13:39:23 -04:00
parent 88191e01da
commit a75ce4197d
5 changed files with 50 additions and 13 deletions

View File

@@ -53,11 +53,12 @@ namespace Emby.Drawing
private readonly IImageEncoder _imageEncoder;
private readonly SemaphoreSlim _imageProcessingSemaphore;
public ImageProcessor(ILogger logger,
IServerApplicationPaths appPaths,
IFileSystem fileSystem,
IJsonSerializer jsonSerializer,
IImageEncoder imageEncoder)
public ImageProcessor(ILogger logger,
IServerApplicationPaths appPaths,
IFileSystem fileSystem,
IJsonSerializer jsonSerializer,
IImageEncoder imageEncoder,
int maxConcurrentImageProcesses)
{
_logger = logger;
_fileSystem = fileSystem;
@@ -93,8 +94,8 @@ namespace Emby.Drawing
}
_cachedImagedSizes = new ConcurrentDictionary<Guid, ImageSize>(sizeDictionary);
var count = Environment.ProcessorCount;
_imageProcessingSemaphore = new SemaphoreSlim(count, count);
_logger.Info("ImageProcessor started with {0} max concurrent image processes", maxConcurrentImageProcesses);
_imageProcessingSemaphore = new SemaphoreSlim(maxConcurrentImageProcesses, maxConcurrentImageProcesses);
}
public string[] SupportedInputFormats