clean up - use google style guide for the RocDecoder class (#101)

* clean up - use google style guide for the RocDecoder class

* make other files/classes to follow the google style guides
이 커밋은 다음에 포함됨:
Aryan Salmanpour
2023-11-29 13:50:38 -05:00
커밋한 사람 GitHub
부모 f8b01f3d1a
커밋 48474fdad9
5개의 변경된 파일84개의 추가작업 그리고 85개의 파일을 삭제
+21 -21
파일 보기
@@ -824,64 +824,64 @@ typedef struct _RocdecProcParams
/***********************************************************************************************************/
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *phDecoder, RocDecoderCreateInfo *pdci)
//! Create the decoder object based on pdci. A handle to the created decoder is returned
//! \fn rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
//! Create the decoder object based on decoder_create_info. A handle to the created decoder is returned
/*****************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *phDecoder, RocDecoderCreateInfo *pdci);
extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info);
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle hDecoder)
//! \fn rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle)
//! Destroy the decoder object
/*****************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle hDecoder);
extern rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle);
/**********************************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(RocdecDecodeCaps *pdc)
//! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(RocdecDecodeCaps *decode_caps)
//! Queries decode capabilities of AMD's VCN decoder based on CodecType, ChromaFormat and BitDepthMinus8 parameters.
//! 1. Application fills IN parameters CodecType, ChromaFormat and BitDepthMinus8 of RocdecDecodeCaps structure
//! 2. On calling rocdecGetDecoderCaps, driver fills OUT parameters (for GPU device) if the IN parameters are supported
//! If IN parameters passed to the driver are not supported by AMD-VCN-HW, then all OUT params are set to 0.
/**********************************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecGetDecoderCaps(RocdecDecodeCaps *pdc);
extern rocDecStatus ROCDECAPI rocDecGetDecoderCaps(RocdecDecodeCaps *decode_caps);
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle hDecoder, RocdecPicParams *pPicParams)
//! \fn rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
//! Decodes a single picture
//! Submits the frame for HW decoding
/*****************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle hDecoder, RocdecPicParams *pPicParams);
extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params);
/************************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle hDecoder, int nPicIdx, RocdecDecodeStatus* pDecodeStatus);
//! \fn rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus* decode_status);
//! Get the decode status for frame corresponding to nPicIdx
//! API is currently supported for HEVC, H264 and JPEG codecs.
//! API returns ROCDEC_NOT_SUPPORTED error code for unsupported GPU or codec.
/************************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle hDecoder, int nPicIdx, RocdecDecodeStatus* pDecodeStatus);
extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus* decode_status);
/*********************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle hDecoder, RocdecReconfigureDecoderInfo *pDecReconfigParams)
//! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
//! Used to reuse single decoder for multiple clips. Currently supports resolution change, resize params
//! params, target area params change for same codec. Must be called during RocdecParserParams::pfnSequenceCallback
/*********************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle hDecoder, RocdecReconfigureDecoderInfo *pDecReconfigParams);
extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params);
/************************************************************************************************************************/
//! \fn extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx,
//! uint32_t *pDevMemPtr, uint32_t *pHorizontalPitch,
//! RocdecProcParams *pVidPostprocParams);
//! \fn extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
//! uint32_t *dev_mem_ptr, uint32_t *horizontal_pitch,
//! RocdecProcParams *vid_postproc_params);
//! Post-process and map video frame corresponding to nPicIdx for use in HIP. Returns HIP device pointer and associated
//! pitch(horizontal stride) of the video frame. Returns device memory pointers and pitch for each plane (Y, U and V) seperately
/************************************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx,
void *pDevMemPtr[3], uint32_t (&pHorizontalPitch)[3],
RocdecProcParams *pVidPostprocParams);
extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
void *dev_mem_ptr[3], uint32_t (&horizontal_pitch)[3],
RocdecProcParams *vid_postproc_params);
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx)
//! \fn rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx)
//! Unmap a previously mapped video frame with the associated nPicIdx
/*****************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx);
extern rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx);
#ifdef __cplusplus
}
+8 -8
파일 보기
@@ -32,14 +32,14 @@ THE SOFTWARE.
*/
struct DecHandle {
explicit DecHandle(RocDecoderCreateInfo& decoder_create_info) : roc_decoder(std::make_shared<RocDecoder>(decoder_create_info)) {}; //constructor
~DecHandle() { clear_errors(); }
std::shared_ptr<RocDecoder> roc_decoder; // class instantiation
bool no_error() { return error.empty(); }
const char* error_msg() { return error.c_str(); }
void capture_error(const std::string& err_msg) { error = err_msg; }
explicit DecHandle(RocDecoderCreateInfo& decoder_create_info) : roc_decoder_(std::make_shared<RocDecoder>(decoder_create_info)) {}; //constructor
~DecHandle() { ClearErrors(); }
std::shared_ptr<RocDecoder> roc_decoder_;
bool NoError() { return error_.empty(); }
const char* ErrorMsg() { return error_.c_str(); }
void CaptureError(const std::string& err_msg) { error_ = err_msg; }
private:
void clear_errors() { error = "";}
std::string error;
void ClearErrors() { error_ = "";}
std::string error_;
};
+7 -8
파일 보기
@@ -57,9 +57,9 @@ RocDecoder::RocDecoder(RocDecoderCreateInfo& decoder_create_info): va_video_deco
return rocdec_status;
}
rocDecStatus RocDecoder::decodeFrame(RocdecPicParams *pPicParams) {
rocDecStatus RocDecoder::DecodeFrame(RocdecPicParams *pic_params) {
rocDecStatus rocdec_status = ROCDEC_SUCCESS;
rocdec_status = va_video_decoder_.SubmitDecode(pPicParams);
rocdec_status = va_video_decoder_.SubmitDecode(pic_params);
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Decode submission is not successful! with rocDecStatus# " + TOSTR(rocdec_status));
}
@@ -67,16 +67,16 @@ rocDecStatus RocDecoder::decodeFrame(RocdecPicParams *pPicParams) {
return rocdec_status;
}
rocDecStatus RocDecoder::getDecodeStatus(int nPicIdx, RocdecDecodeStatus* pDecodeStatus) {
rocDecStatus RocDecoder::GetDecodeStatus(int pic_idx, RocdecDecodeStatus* decode_status) {
rocDecStatus rocdec_status = ROCDEC_SUCCESS;
rocdec_status = va_video_decoder_.GetDecodeStatus(nPicIdx, pDecodeStatus);
rocdec_status = va_video_decoder_.GetDecodeStatus(pic_idx, decode_status);
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Failed to query the decode status! with rocDecStatus# " + TOSTR(rocdec_status));
}
return rocdec_status;
}
rocDecStatus RocDecoder::reconfigureDecoder(RocdecReconfigureDecoderInfo *pDecReconfigParams) {
rocDecStatus RocDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo *reconfig_params) {
// todo:: return appropriate decStatus
// this will be called when the current configuration is changed during decoding
// release the current va-api decoder instance and create a new one with the new parameters (or reinit if available)
@@ -84,8 +84,7 @@ rocDecStatus RocDecoder::reconfigureDecoder(RocdecReconfigureDecoderInfo *pDecRe
return ROCDEC_NOT_IMPLEMENTED;
}
rocDecStatus RocDecoder::mapVideoFrame(int pic_idx, void *dev_mem_ptr[3],
unsigned int horizontal_pitch[3], RocdecProcParams *vid_postproc_params) {
rocDecStatus RocDecoder::MapVideoFrame(int pic_idx, void *dev_mem_ptr[3], uint32_t horizontal_pitch[3], RocdecProcParams *vid_postproc_params) {
if (pic_idx >= hip_ext_mem_.size() || &dev_mem_ptr[0] == nullptr || vid_postproc_params == nullptr) {
return ROCDEC_INVALID_PARAMETER;
}
@@ -123,7 +122,7 @@ rocDecStatus RocDecoder::mapVideoFrame(int pic_idx, void *dev_mem_ptr[3],
return rocdec_status;
}
rocDecStatus RocDecoder::unMapVideoFrame(int pic_idx) {
rocDecStatus RocDecoder::UnMapVideoFrame(int pic_idx) {
if (pic_idx >= hip_ext_mem_.size()) {
return ROCDEC_INVALID_PARAMETER;
}
+5 -5
파일 보기
@@ -47,11 +47,11 @@ public:
RocDecoder(RocDecoderCreateInfo &decoder_create_info);
~RocDecoder();
rocDecStatus InitializeDecoder();
rocDecStatus decodeFrame(RocdecPicParams *pPicParams);
rocDecStatus getDecodeStatus(int nPicIdx, RocdecDecodeStatus* pDecodeStatus);
rocDecStatus reconfigureDecoder(RocdecReconfigureDecoderInfo *pDecReconfigParams);
rocDecStatus mapVideoFrame(int pic_idx, void *dev_mem_ptr[3], unsigned int horizontal_pitch[3], RocdecProcParams *vid_postproc_params);
rocDecStatus unMapVideoFrame(int pic_idx);
rocDecStatus DecodeFrame(RocdecPicParams *pic_params);
rocDecStatus GetDecodeStatus(int pic_idx, RocdecDecodeStatus* decode_status);
rocDecStatus ReconfigureDecoder(RocdecReconfigureDecoderInfo *reconfig_params);
rocDecStatus MapVideoFrame(int pic_idx, void *dev_mem_ptr[3], uint32_t horizontal_pitch[3], RocdecProcParams *vid_postproc_params);
rocDecStatus UnMapVideoFrame(int pic_idx);
private:
rocDecStatus InitHIP(int device_id);
+43 -43
파일 보기
@@ -26,36 +26,36 @@ THE SOFTWARE.
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *phDecoder, RocDecoderCreateInfo *pdci)
//! Create the decoder object based on pdci. A handle to the created decoder is returned
//! \fn rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
//! Create the decoder object based on decoder_create_info. A handle to the created decoder is returned
/*****************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecCreateDecoder(rocDecDecoderHandle *phDecoder, RocDecoderCreateInfo *pdci) {
rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info) {
rocDecDecoderHandle handle = nullptr;
try {
handle = new DecHandle(*pdci);
}
handle = new DecHandle(*decoder_create_info);
}
catch(const std::exception& e) {
ERR( STR("Failed to init the rocDecode handle, ") + STR(e.what()))
return ROCDEC_NOT_INITIALIZED;
}
*phDecoder = handle;
return static_cast<DecHandle *>(handle)->roc_decoder->InitializeDecoder();
*decoder_handle = handle;
return static_cast<DecHandle *>(handle)->roc_decoder_->InitializeDecoder();
}
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle hDecoder)
//! \fn rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle)
//! Destroy the decoder object
/*****************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecDestroyDecoder(rocDecDecoderHandle hDecoder) {
auto handle = static_cast<DecHandle *> (hDecoder);
rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle) {
auto handle = static_cast<DecHandle *> (decoder_handle);
delete handle;
return ROCDEC_SUCCESS;
}
/**********************************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(rocDecDecoderHandle hDecoder, RocdecDecodeCaps *pdc)
//! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(rocDecDecoderHandle decoder_handle, RocdecDecodeCaps *pdc)
//! Queries decode capabilities of AMD's VCN decoder based on CodecType, ChromaFormat and BitDepthMinus8 parameters.
//! 1. Application fills IN parameters CodecType, ChromaFormat and BitDepthMinus8 of RocdecDecodeCaps structure
//! 2. On calling rocdecGetDecoderCaps, driver fills OUT parameters if the IN parameters are supported
@@ -93,19 +93,19 @@ rocDecGetDecoderCaps(RocdecDecodeCaps *pdc) {
}
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle hDecoder, RocdecPicParams *pPicParams)
//! \fn rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
//! Decodes a single picture
//! Submits the frame for HW decoding
/*****************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecDecodeFrame(rocDecDecoderHandle hDecoder, RocdecPicParams *pPicParams) {
auto handle = static_cast<DecHandle *> (hDecoder);
rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params) {
auto handle = static_cast<DecHandle *> (decoder_handle);
rocDecStatus ret;
try {
ret = handle->roc_decoder->decodeFrame(pPicParams);
ret = handle->roc_decoder_->DecodeFrame(pic_params);
}
catch(const std::exception& e) {
handle->capture_error(e.what());
handle->CaptureError(e.what());
ERR(e.what())
return ROCDEC_RUNTIME_ERROR;
}
@@ -113,23 +113,23 @@ rocDecDecodeFrame(rocDecDecoderHandle hDecoder, RocdecPicParams *pPicParams) {
}
/************************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI RocdecGetDecodeStatus(rocDecDecoderHandle hDecoder, int nPicIdx, RocdecDecodeStatus* pDecodeStatus);
//! Get the decode status for frame corresponding to nPicIdx
//! \fn rocDecStatus ROCDECAPI RocdecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus* decode_status);
//! Get the decode status for frame corresponding to pic_idx
//! API is currently supported for HEVC, H264 and JPEG codecs.
//! API returns CUDA_ERROR_NOT_SUPPORTED error code for unsupported GPU or codec.
/************************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecGetDecodeStatus(rocDecDecoderHandle hDecoder, int nPicIdx, RocdecDecodeStatus* pDecodeStatus) {
if (hDecoder == nullptr || pDecodeStatus == nullptr) {
rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus* decode_status) {
if (decoder_handle == nullptr || decode_status == nullptr) {
return ROCDEC_INVALID_PARAMETER;
}
auto handle = static_cast<DecHandle *> (hDecoder);
auto handle = static_cast<DecHandle *> (decoder_handle);
rocDecStatus ret;
try {
ret = handle->roc_decoder->getDecodeStatus(nPicIdx, pDecodeStatus);
ret = handle->roc_decoder_->GetDecodeStatus(pic_idx, decode_status);
}
catch(const std::exception& e) {
handle->capture_error(e.what());
handle->CaptureError(e.what());
ERR(e.what())
return ROCDEC_RUNTIME_ERROR;
}
@@ -137,19 +137,19 @@ rocDecGetDecodeStatus(rocDecDecoderHandle hDecoder, int nPicIdx, RocdecDecodeSta
}
/*********************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle hDecoder, RocdecReconfigureDecoderInfo *pDecReconfigParams)
//! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
//! Used to reuse single decoder for multiple clips. Currently supports resolution change, resize params
//! params, target area params change for same codec. Must be called during RocdecParserParams::pfnSequenceCallback
/*********************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecReconfigureDecoder(rocDecDecoderHandle hDecoder, RocdecReconfigureDecoderInfo *pDecReconfigParams) {
auto handle = static_cast<DecHandle *> (hDecoder);
rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params) {
auto handle = static_cast<DecHandle *> (decoder_handle);
rocDecStatus ret;
try {
ret = handle->roc_decoder->reconfigureDecoder(pDecReconfigParams);
ret = handle->roc_decoder_->ReconfigureDecoder(reconfig_params);
}
catch(const std::exception& e) {
handle->capture_error(e.what());
handle->CaptureError(e.what());
ERR(e.what())
return ROCDEC_RUNTIME_ERROR;
}
@@ -157,22 +157,22 @@ rocDecReconfigureDecoder(rocDecDecoderHandle hDecoder, RocdecReconfigureDecoderI
}
/************************************************************************************************************************/
//! \fn extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx,
//! unsigned int *pDevMemPtr, unsigned int *pHorizontalPitch,
//! RocdecProcParams *pVidPostprocParams);
//! Post-process and map video frame corresponding to nPicIdx for use in HIP. Returns HIP device pointer and associated
//! \fn extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
//! unsigned int *dev_mem_ptr, unsigned int *horizontal_pitch,
//! RocdecProcParams *vid_postproc_params);
//! Post-process and map video frame corresponding to pic_idx for use in HIP. Returns HIP device pointer and associated
//! pitch(horizontal stride) of the video frame. Returns device memory pointers for each plane (Y, U and V) seperately
/************************************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx,
void *pDevMemPtr[3], uint32_t (&pHorizontalPitch)[3], RocdecProcParams *pVidPostprocParams) {
auto handle = static_cast<DecHandle *> (hDecoder);
rocDecMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
void *dev_mem_ptr[3], uint32_t (&horizontal_pitch)[3], RocdecProcParams *vid_postproc_params) {
auto handle = static_cast<DecHandle *> (decoder_handle);
rocDecStatus ret;
try {
ret = handle->roc_decoder->mapVideoFrame(nPicIdx, pDevMemPtr, pHorizontalPitch, pVidPostprocParams);
ret = handle->roc_decoder_->MapVideoFrame(pic_idx, dev_mem_ptr, horizontal_pitch, vid_postproc_params);
}
catch(const std::exception& e) {
handle->capture_error(e.what());
handle->CaptureError(e.what());
ERR(e.what())
return ROCDEC_RUNTIME_ERROR;
}
@@ -180,18 +180,18 @@ rocDecMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx,
}
/*****************************************************************************************************/
//! \fn rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle hDecoder, int nPicIdx)
//! Unmap a previously mapped video frame with the associated nPicIdx
//! \fn rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx)
//! Unmap a previously mapped video frame with the associated pic_idx
/*****************************************************************************************************/
rocDecStatus ROCDECAPI
rocDecUnMapVideoFrame(rocDecDecoderHandle hDecoder, int pic_idx) {
auto handle = static_cast<DecHandle *> (hDecoder);
rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx) {
auto handle = static_cast<DecHandle *> (decoder_handle);
rocDecStatus ret;
try {
ret = handle->roc_decoder->unMapVideoFrame(pic_idx);
ret = handle->roc_decoder_->UnMapVideoFrame(pic_idx);
}
catch(const std::exception& e) {
handle->capture_error(e.what());
handle->CaptureError(e.what());
ERR(e.what())
return ROCDEC_RUNTIME_ERROR;
}