History

Add public options for setting a log callback

Martin Storsjö committed 12 years ago

Commit 090229f1 parent dc91e093 files · +35 −3Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+14−1
@@ -242,7 +242,8 @@ void CWelsDecoder::InitDecoder (void) { · 241 unmodified lines
242long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {242long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
243 int iVal = 0;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 return dsInitialOptExpected;247 return dsInitialOptExpected;
247 248
248 if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame249 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 m_pWelsTrace->SetTraceLevel (level);275 m_pWelsTrace->SetTraceLevel (level);
275 }276 }
276 return cmResultSuccess;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 return cmInitParaError;292 return cmInitParaError;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t