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
563 return cmInitParaError;563 return cmInitParaError;
564 }564 }
565 565
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) {
567 return cmInitExpected;568 return cmInitExpected;
568 }569 }
569 570
@@ -871,6 +872,20 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 301 unmodified lines
871 }872 }
872 }873 }
873 break;874 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;
874 default:889 default:
875 return cmInitParaError;890 return cmInitParaError;
876 }891 }

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