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/encoder/plus/src/welsEncoderExt.cpp (1 of 3 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+16−1
@@ -563,7 +563,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 562 unmodified lines
563563 return cmInitParaError;
564564 }
565565
566− if ((NULL == m_pEncContext || false == m_bInitialFlag) && eOptionId != ENCODER_OPTION_TRACE_LEVEL) {
566+ if ((NULL == m_pEncContext || false == m_bInitialFlag) && eOptionId != ENCODER_OPTION_TRACE_LEVEL
567+ && eOptionId != ENCODER_OPTION_TRACE_CALLBACK && eOptionId != ENCODER_OPTION_TRACE_CALLBACK_CONTEXT) {
567568 return cmInitExpected;
568569 }
569570
@@ -871,6 +872,20 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 301 unmodified lines
871872 }
872873 }
873874 break;
875+ case ENCODER_OPTION_TRACE_CALLBACK: {
876+ if (m_pWelsTrace) {
877+ CM_WELS_TRACE callback = * ((CM_WELS_TRACE*)pOption);
878+ m_pWelsTrace->SetTraceCallback (callback);
879+ }
880+ }
881+ break;
882+ case ENCODER_OPTION_TRACE_CALLBACK_CONTEXT: {
883+ if (m_pWelsTrace) {
884+ void* ctx = * ((void**)pOption);
885+ m_pWelsTrace->SetTraceCallbackContext (ctx);
886+ }
887+ }
888+ break;
874889 default:
875890 return cmInitParaError;
876891 }

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