Mercurial > hg > orthanc
changeset 6840:b891f8f14b51 streaming
simplification
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 21 May 2026 14:45:25 +0200 |
| parents | 7c9ecd5a793c |
| children | 6b9b5351d247 |
| files | OrthancServer/Sources/ServerContext.cpp OrthancServer/Sources/ServerContext.h |
| diffstat | 2 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp Thu May 21 14:13:21 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Thu May 21 14:45:25 2026 +0200 @@ -1148,9 +1148,7 @@ const FileInfo& attachment, const std::string& filename) { - std::unique_ptr<StorageAreaDataSource::Range> range( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr<StorageAreaDataSource::Range> range(ReadAttachment(attachment, true /* uncompress */)); BufferHttpSender sender; sender.SetBuffer(range->GetData(), range->GetSize()); @@ -1191,10 +1189,7 @@ FileInfo modified; { - std::unique_ptr<StorageAreaDataSource::Range> range( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); - + std::unique_ptr<StorageAreaDataSource::Range> range(ReadAttachment(attachment, true /* uncompress */)); accessor.Write(modified, range->GetData(), range->GetSize(), attachmentType, compression, storeMD5_, NULL); } @@ -1394,9 +1389,7 @@ * "/.../.../reconstruct" will disable this case. **/ - std::unique_ptr<StorageAreaDataSource::Range> dicomAsJson( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr<StorageAreaDataSource::Range> dicomAsJson(ReadAttachment(attachment, true /* uncompress */)); if (!Toolbox::ReadJson(result, dicomAsJson->GetData(), dicomAsJson->GetSize())) { @@ -1417,8 +1410,7 @@ throw OrthancException(ErrorCode_UnknownResource); } - std::unique_ptr<StorageAreaDataSource::Range> range( - StorageAreaDataSource::ReadAttachment(*storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr<StorageAreaDataSource::Range> range(ReadAttachment(attachment, true /* uncompress */)); // We don't use the cache, as this would complexify the code for a rare edge case ParsedDicomFile dicom(range->GetData(), range->GetSize());
--- a/OrthancServer/Sources/ServerContext.h Thu May 21 14:13:21 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Thu May 21 14:45:25 2026 +0200 @@ -587,7 +587,7 @@ void PublishCacheMetrics(); - const boost::shared_ptr<ServerTranscoder>& GetTranscoder() const; // TODO-Streaming : REMOVE + const boost::shared_ptr<ServerTranscoder>& GetTranscoder() const; Future* SubmitTranscodingRequest(TranscodingCallable* callable); };
