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