# HG changeset patch # User Sebastien Jodogne # Date 1779352616 -7200 # Node ID 2e85b570380c402f9c5d0bcce79ac5545f899a3a # Parent 616e673d14993205e96f6ada68788e8633ef523c simplification diff -r 616e673d1499 -r 2e85b570380c OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Thu May 21 10:27:22 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Thu May 21 10:36:56 2026 +0200 @@ -25,6 +25,7 @@ #include "ServerContext.h" #include "../../OrthancFramework/Sources/Cache/SharedArchive.h" +#include "../../OrthancFramework/Sources/Constants.h" #include "../../OrthancFramework/Sources/DataSource/DataSourceReader.h" #include "../../OrthancFramework/Sources/DataSource/TranscoderDataSource.h" #include "../../OrthancFramework/Sources/DicomFormat/DicomElement.h" @@ -67,8 +68,6 @@ # include #endif -static size_t DICOM_CACHE_SIZE = static_cast(128) * 1024 * 1024; // 128 MB - /** * IMPORTANT: We make the assumption that the same instance of @@ -569,7 +568,7 @@ pool->Start(); storageAreaReader_.reset(new DataSourceReader(pool, new StorageAreaDataSource(area_))); - storageAreaReader_->CreateCache(DICOM_CACHE_SIZE); // TODO-Streaming - Parameter + storageAreaReader_->CreateCache(128 * MEGABYTE); // 128 MB - TODO-Streaming - Parameter } { @@ -580,7 +579,7 @@ pool->Start(); dicomReader_.reset(new DataSourceReader(pool, new DicomDataSource(storageAreaReader_))); - dicomReader_->CreateCache(100 * 1024 * 1024); // 100 MB - TODO-Streaming - Parameter + dicomReader_->CreateCache(128 * MEGABYTE); // 128 MB - TODO-Streaming - Parameter } if (transcoder_.get() != NULL) @@ -592,7 +591,7 @@ transcoderThreadPool_->Start(); transcoderReader_.reset(new DataSourceReader(transcoderThreadPool_, new TranscoderDataSource(transcoder_, storageAreaReader_))); - transcoderReader_->CreateCache(100 * 1024 * 1024); // 100 MB - TODO-Streaming - Parameter + transcoderReader_->CreateCache(128 * MEGABYTE); // 128 MB - TODO-Streaming - Parameter } } catch (OrthancException&) diff -r 616e673d1499 -r 2e85b570380c OrthancServer/Sources/ServerContext.h --- a/OrthancServer/Sources/ServerContext.h Thu May 21 10:27:22 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Thu May 21 10:36:56 2026 +0200 @@ -358,7 +358,7 @@ StoreResult TranscodeAndStore(std::string& resultPublicId, DicomInstanceToStore* dicom, - bool isReconstruct = false); + bool isReconstruct = false); // TODO-Streaming: To check void AnswerAttachment(RestApiOutput& output, const FileInfo& fileInfo, @@ -601,11 +601,6 @@ return *storageAreaReader_; } - DataSourceReader& GetDicomReader() const // TODO-Streaming : REMOVE? - { - return *dicomReader_; - } - Future* SubmitTranscodingRequest(TranscodingCallable* callable); }; }