History

move trace related info to interface header

ruil2 committed 12 years ago

Commit 44b048e1 parent 84c1f3a7 files · +20 −22Browse files

Unified · Split

7 files
  1. codec/api/svc/codec_api.h +1 −0
  2. codec/api/svc/codec_app_def.h +12 −0
  3. codec/common/inc/utils.h +0 −15
  4. codec/common/inc/welsCodecTrace.h +4 −4
  5. codec/common/src/welsCodecTrace.cpp +1 −1
  6. codec/decoder/plus/src/welsDecoderExt.cpp +1 −1
  7. codec/encoder/plus/src/welsEncoderExt.cpp +1 −1
codec/api/svc/codec_api.h+1−0
@@ -191,6 +191,7 @@ long (*GetOption) (ISVCDecoder*, DECODER_OPTION eOptionId, void* pOption); · 190 unmodified lines
191191 };
192192 #endif
193193
194+typedef void (*WelsTraceCallback) (void* ctx, int level, const char* string);
194195
195196 int WelsCreateSVCEncoder (ISVCEncoder** ppEncoder);
196197 void WelsDestroySVCEncoder (ISVCEncoder* pEncoder);
codec/api/svc/codec_app_def.h+12−0
@@ -231,6 +231,18 @@ typedef enum { · 230 unmodified lines
231231 LEVEL_5_2
232232 } ELevelIdc;
233233
234+
235+enum {
236+ WELS_LOG_QUIET = 0x00, // Quiet mode
237+ WELS_LOG_ERROR = 1 << 0, // Error log iLevel
238+ WELS_LOG_WARNING = 1 << 1, // Warning log iLevel
239+ WELS_LOG_INFO = 1 << 2, // Information log iLevel
240+ WELS_LOG_DEBUG = 1 << 3, // Debug log iLevel
241+ WELS_LOG_RESV = 1 << 4, // Resversed log iLevel
242+ WELS_LOG_LEVEL_COUNT = 5,
243+ WELS_LOG_DEFAULT = WELS_LOG_DEBUG // Default log iLevel in Wels codec
244+};
245+
234246 typedef struct {
235247 SliceModeEnum uiSliceMode; //by default, uiSliceMode will be SM_SINGLE_SLICE
236248 SSliceArgument sSliceArgument;
codec/common/inc/utils.h+0−15
@@ -43,21 +43,6 @@ · 42 unmodified lines
4343 #include "typedefs.h"
4444
4545
46−/*
47− * Log output routines
48− */
49−
50−enum {
51− WELS_LOG_QUIET = 0x00, // Quiet mode
52− WELS_LOG_ERROR = 1 << 0, // Error log iLevel
53− WELS_LOG_WARNING = 1 << 1, // Warning log iLevel
54− WELS_LOG_INFO = 1 << 2, // Information log iLevel
55− WELS_LOG_DEBUG = 1 << 3, // Debug log iLevel
56− WELS_LOG_RESV = 1 << 4, // Resversed log iLevel
57− WELS_LOG_LEVEL_COUNT = 5,
58− WELS_LOG_DEFAULT = WELS_LOG_DEBUG // Default log iLevel in Wels codec
59−};
60−
6146 /*
6247 * Function pointer declaration for various tool sets
6348 */
codec/common/inc/welsCodecTrace.h+4−4
@@ -36,8 +36,8 @@ · 35 unmodified lines
3636 #include <stdarg.h>
3737 #include "typedefs.h"
3838 #include "utils.h"
39−
40−typedef void (*CM_WELS_TRACE) (void* ctx, int level, const char* string);
39+#include "codec_app_def.h"
40+#include "codec_api.h"
4141
4242 class welsCodecTrace {
4343 public:
@@ -45,7 +45,7 @@ class welsCodecTrace { · 1 unmodified line
4545 ~welsCodecTrace();
4646
4747 void SetTraceLevel (const int32_t kiLevel);
48− void SetTraceCallback (CM_WELS_TRACE func);
48+ void SetTraceCallback (WelsTraceCallback func);
4949 void SetTraceCallbackContext (void* pCtx);
5050
5151 private:
@@ -53,7 +53,7 @@ class welsCodecTrace { · 1 unmodified line
5353 void CodecTrace (const int32_t kiLevel, const char* kpStrFormat, va_list vl);
5454
5555 int32_t m_iTraceLevel;
56− CM_WELS_TRACE m_fpTrace;
56+ WelsTraceCallback m_fpTrace;
5757 void* m_pTraceCtx;
5858 public:
5959
codec/common/src/welsCodecTrace.cpp+1−1
@@ -87,7 +87,7 @@ void welsCodecTrace::SetTraceLevel (const int32_t iLevel) { · 86 unmodified lines
8787 m_iTraceLevel = iLevel;
8888 }
8989
90−void welsCodecTrace::SetTraceCallback (CM_WELS_TRACE func) {
90+void welsCodecTrace::SetTraceCallback (WelsTraceCallback func) {
9191 m_fpTrace = func;
9292 }
9393
codec/decoder/plus/src/welsDecoderExt.cpp+1−1
@@ -277,7 +277,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 276 unmodified lines
277277 return cmResultSuccess;
278278 } else if (eOptID == DECODER_OPTION_TRACE_CALLBACK) {
279279 if (m_pWelsTrace) {
280− CM_WELS_TRACE callback = * ((CM_WELS_TRACE*)pOption);
280+ WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);
281281 m_pWelsTrace->SetTraceCallback (callback);
282282 }
283283 return cmResultSuccess;
codec/encoder/plus/src/welsEncoderExt.cpp+1−1
@@ -874,7 +874,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 873 unmodified lines
874874 break;
875875 case ENCODER_OPTION_TRACE_CALLBACK: {
876876 if (m_pWelsTrace) {
877− CM_WELS_TRACE callback = * ((CM_WELS_TRACE*)pOption);
877+ WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);
878878 m_pWelsTrace->SetTraceCallback (callback);
879879 }
880880 }

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