Showing the changes to codec/decoder/plus/src/welsCodecTrace.cpp (1 of 9 files). Show all
Unified · Split
| @@ -44,6 +44,7 @@ · 43 unmodified lines | |||
| 44 | 44 | ||
| 45 | #include "welsCodecTrace.h" | 45 | #include "welsCodecTrace.h" |
| 46 | #include "utils.h" | 46 | #include "utils.h" |
| 47 | #include "logging.h" | ||
| 47 | #if defined LINUX || defined SOLARIS || defined UNIX || defined MACOS //LINUX/SOLARIS/UNIX | 48 | #if defined LINUX || defined SOLARIS || defined UNIX || defined MACOS //LINUX/SOLARIS/UNIX |
| 48 | #include <dlfcn.h> | 49 | #include <dlfcn.h> |
| 49 | #endif | 50 | #endif |
| @@ -210,7 +211,7 @@ int32_t CWelsTraceWinDgb::WriteString(int32_t iLevel, const str_t * pStr) · 160 unmodified lines | |||
| 210 | CWelsCodecTrace::CWelsCodecTrace() | 211 | CWelsCodecTrace::CWelsCodecTrace() |
| 211 | { | 212 | { |
| 212 | m_hTraceHandle = NULL; | 213 | m_hTraceHandle = NULL; |
| 213 | m_fpDebugTrace = NULL; | 214 | m_fpDebugTrace = NULL; |
| 214 | m_fpInfoTrace = NULL; | 215 | m_fpInfoTrace = NULL; |
| 215 | m_fpWarnTrace = NULL; | 216 | m_fpWarnTrace = NULL; |
| 216 | m_fpErrorTrace = NULL; | 217 | m_fpErrorTrace = NULL; |
| @@ -224,7 +225,13 @@ CWelsCodecTrace::~CWelsCodecTrace() · 7 unmodified lines | |||
| 224 | } | 225 | } |
| 225 | 226 | ||
| 226 | int32_t CWelsCodecTrace::LoadWelsTraceModule() | 227 | int32_t CWelsCodecTrace::LoadWelsTraceModule() |
| 227 | { | 228 | { |
| 229 | #ifdef NO_DYNAMIC_VP | ||
| 230 | m_fpDebugTrace = welsStderrTrace<WELS_LOG_DEBUG>; | ||
| 231 | m_fpInfoTrace = welsStderrTrace<WELS_LOG_INFO>; | ||
| 232 | m_fpWarnTrace = welsStderrTrace<WELS_LOG_WARNING>; | ||
| 233 | m_fpErrorTrace = welsStderrTrace<WELS_LOG_ERROR>; | ||
| 234 | #else | ||
| 228 | #if defined WIN32 | 235 | #if defined WIN32 |
| 229 | HMODULE hHandle = ::LoadLibrary("welstrace.dll"); | 236 | HMODULE hHandle = ::LoadLibrary("welstrace.dll"); |
| 230 | // HMODULE handle = ::LoadLibrary("contrace.dll"); // for c7 trace | 237 | // HMODULE handle = ::LoadLibrary("contrace.dll"); // for c7 trace |
| @@ -307,6 +314,7 @@ int32_t CWelsCodecTrace::LoadWelsTraceModule() · 76 unmodified lines | |||
| 307 | } | 314 | } |
| 308 | } | 315 | } |
| 309 | #endif | 316 | #endif |
| 317 | #endif // NO_DYNAMIC_VP | ||
| 310 | return 0; | 318 | return 0; |
| 311 | } | 319 | } |
| 312 | 320 | ||
| @@ -336,7 +344,9 @@ int32_t CWelsCodecTrace::UnloadWelsTraceModule() · 23 unmodified lines | |||
| 336 | 344 | ||
| 337 | int32_t CWelsCodecTrace::WriteString(int32_t iLevel, const str_t * pStr) | 345 | int32_t CWelsCodecTrace::WriteString(int32_t iLevel, const str_t * pStr) |
| 338 | { | 346 | { |
| 347 | #ifndef NO_DYNAMIC_VP | ||
| 339 | if( m_hTraceHandle ) | 348 | if( m_hTraceHandle ) |
| 349 | #endif | ||
| 340 | { | 350 | { |
| 341 | #ifdef WIN32 | 351 | #ifdef WIN32 |
| 342 | switch(iLevel) | 352 | switch(iLevel) |
| @@ -416,4 +426,4 @@ IWelsTrace * CreateWelsTrace(EWelsTraceType eType, void_t * pParam) · 73 unmodified lines | |||
| 416 | return pTrace; | 426 | return pTrace; |
| 417 | } | 427 | } |
| 418 | 428 | ||
| 419 | } // namespace WelsDec | 429 | } // namespace WelsDec |