Ejemplo n.º 1
0
int32_t  CWelsCodecTrace::WriteString (int32_t iLevel, const char* pStr) {
  {
    switch (iLevel) {
    case WELS_LOG_ERROR:
      if (m_fpErrorTrace)
        m_fpErrorTrace ("%s", pStr);
      break;
    case WELS_LOG_WARNING:
      if (m_fpWarnTrace)
        m_fpWarnTrace ("%s", pStr);
      break;
    case WELS_LOG_INFO:
      if (m_fpInfoTrace)
        m_fpInfoTrace ("%s", pStr);
      break;
    case WELS_LOG_DEBUG:
      if (m_fpDebugTrace)
        m_fpDebugTrace ("%s", pStr);
      break;
    default:
      if (m_fpDebugTrace)
        m_fpDebugTrace ("%s", pStr);
      break;
    }
  }

  return 0;
}
Ejemplo n.º 2
0
int32_t  CWelsCodecTrace::WriteString(int32_t iLevel, const str_t * pStr)
{
#ifndef NO_DYNAMIC_VP
	if( m_hTraceHandle )
#endif
	{
#ifdef WIN32
		switch(iLevel)
		{
		case WELS_LOG_ERROR:
			if(m_fpErrorTrace)
				m_fpErrorTrace("%s", pStr);
			break;
		case WELS_LOG_WARNING:
			if(m_fpWarnTrace)
				m_fpWarnTrace("%s", pStr);
			break;
		case WELS_LOG_INFO:
			if(m_fpInfoTrace)
				m_fpInfoTrace("%s", pStr);
			break;
		case WELS_LOG_DEBUG:
			if(m_fpDebugTrace)
				m_fpDebugTrace("%s", pStr);
			break;
		default:
			if(m_fpDebugTrace)
				m_fpInfoTrace("%s", pStr);
			break;
		}
#else
		switch(iLevel)
		{
		case WELS_LOG_ERROR:
			if(m_fpErrorTrace)
				m_fpErrorTrace("CODEC", "%s", pStr);
			break;
		case WELS_LOG_WARNING:
			if(m_fpWarnTrace)
				m_fpWarnTrace("CODEC", "%s",  pStr);
			break;
		case WELS_LOG_INFO:
			if(m_fpInfoTrace)
				m_fpInfoTrace("CODEC", "%s",  pStr);
			break;
		case WELS_LOG_DEBUG:
			if(m_fpInfoTrace)
				m_fpInfoTrace("CODEC", "%s",  pStr);
			break;
		default:
			if(m_fpInfoTrace)
				m_fpInfoTrace("CODEC", "%s",  pStr);
			break;
		}
#endif
	}

	return 0;
}