ref: 573dad7d04533449372968dd7177ec3c5d3dc179
parent: 77c3594e08fbf4f7956232fc2d33a5f5768302b1
author: Martin Storsjö <[email protected]>
date: Tue Jun 10 10:54:21 EDT 2014
Add a decoder option for setting the trace level
--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -107,6 +107,7 @@
DECODER_OPTION_LTR_MARKING_FLAG, // feedback wether current frame mark a LTR
DECODER_OPTION_LTR_MARKED_FRAME_NUM, // feedback frame num marked by current Frame
DECODER_OPTION_ERROR_CON_IDC, //not finished yet, indicate decoder error concealment status, in progress
+ DECODER_OPTION_TRACE_LEVEL,
} DECODER_OPTION;
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -237,7 +237,7 @@
long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
int iVal = 0;
- if (m_pDecContext == NULL)
+ if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL)
return dsInitialOptExpected;
if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame
@@ -262,6 +262,12 @@
else
iVal = * ((int*)pOption); //EC method
m_pDecContext->iErrorConMethod = iVal;
+ return cmResultSuccess;
+ } else if (eOptID == DECODER_OPTION_TRACE_LEVEL) {
+ if (m_pWelsTrace) {
+ uint32_t level = * ((uint32_t*)pOption);
+ m_pWelsTrace->SetTraceLevel (level);
+ }
return cmResultSuccess;
}