Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 3 files). Show all
Unified · Split
| @@ -242,7 +242,8 @@ void CWelsDecoder::InitDecoder (void) { · 241 unmodified lines | ||
| 242 | 242 | long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { |
| 243 | 243 | int iVal = 0; |
| 244 | 244 | |
| 245 | − if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL) | |
| 245 | + if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL && | |
| 246 | + eOptID != DECODER_OPTION_TRACE_CALLBACK && eOptID != DECODER_OPTION_TRACE_CALLBACK_CONTEXT) | |
| 246 | 247 | return dsInitialOptExpected; |
| 247 | 248 | |
| 248 | 249 | if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame |
| @@ -274,6 +275,18 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 25 unmodified lines | ||
| 274 | 275 | m_pWelsTrace->SetTraceLevel (level); |
| 275 | 276 | } |
| 276 | 277 | return cmResultSuccess; |
| 278 | + } else if (eOptID == DECODER_OPTION_TRACE_CALLBACK) { | |
| 279 | + if (m_pWelsTrace) { | |
| 280 | + CM_WELS_TRACE callback = * ((CM_WELS_TRACE*)pOption); | |
| 281 | + m_pWelsTrace->SetTraceCallback (callback); | |
| 282 | + } | |
| 283 | + return cmResultSuccess; | |
| 284 | + } else if (eOptID == DECODER_OPTION_TRACE_CALLBACK_CONTEXT) { | |
| 285 | + if (m_pWelsTrace) { | |
| 286 | + void* ctx = * ((void**)pOption); | |
| 287 | + m_pWelsTrace->SetTraceCallbackContext (ctx); | |
| 288 | + } | |
| 289 | + return cmResultSuccess; | |
| 277 | 290 | } |
| 278 | 291 | |
| 279 | 292 | return cmInitParaError; |