Mercurial > hg > orthanc
changeset 6832:2e85b570380c streaming
simplification
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 21 May 2026 10:36:56 +0200 |
| parents | 616e673d1499 |
| children | 36da56de363d |
| files | OrthancServer/Sources/ServerContext.cpp OrthancServer/Sources/ServerContext.h |
| diffstat | 2 files changed, 5 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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 <malloc.h> #endif -static size_t DICOM_CACHE_SIZE = static_cast<size_t>(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&)
--- 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); }; }
