From 647270b0a90ce06f76d02d8caae2d3f836b929ec Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Sun, 28 Jul 2019 18:58:25 +0100
Subject: [PATCH 07/18] Update JLS_ERROR to jpegls_error in CharLS usage
---
dcmjpls/libsrc/djcodecd.cc | 3 ++-
dcmjpls/libsrc/djcodece.cc | 5 +++--
dcmjpls/libsrc/djerror.h | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc
index a94ad00ec..f580a6e1f 100644
--- a/dcmjpls/libsrc/djcodecd.cc
+++ b/dcmjpls/libsrc/djcodecd.cc
@@ -38,6 +38,7 @@
// JPEG-LS library (CharLS) includes
#include "CharLS/charls.h"
+#include "CharLS/public_types.h"
E_TransferSyntax DJLSLosslessDecoder::supportedTransferSyntax() const
{
@@ -405,7 +406,7 @@ OFCondition DJLSDecoderBase::decodeFrame(
if (result.good())
{
JlsParameters params;
- JLS_ERROR err;
+ CharlsApiResultType err;
err = JpegLsReadHeader(jlsData, compressedSize, ¶ms);
result = DJLSError::convert(err);
diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc
index 73ea8f860..b780bc90a 100644
--- a/dcmjpls/libsrc/djcodece.cc
+++ b/dcmjpls/libsrc/djcodece.cc
@@ -53,6 +53,7 @@
// JPEG-LS library (CharLS) includes
#include "CharLS/charls.h"
+#include "CharLS/public_types.h"
BEGIN_EXTERN_C
#ifdef HAVE_FCNTL_H
@@ -742,7 +743,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(
size_t bytesWritten = 0;
- JLS_ERROR err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params);
+ CharlsApiResultType err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params);
result = DJLSError::convert(err);
if (result.good())
@@ -1148,7 +1149,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(
size_t bytesWritten = 0;
- JLS_ERROR err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params);
+ CharlsApiResultType err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params);
result = DJLSError::convert(err);
if (result.good())
diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h
index 8bb51dc24..a701dbada 100644
--- a/dcmjpls/libsrc/djerror.h
+++ b/dcmjpls/libsrc/djerror.h
@@ -40,7 +40,7 @@ public:
* @param error The CharLS error code
* @return The OFCondition
*/
- static const OFConditionConst& convert(JLS_ERROR error)
+ static const OFConditionConst& convert(CharlsApiResultType error)
{
switch (error)
{
--
2.39.2