wmaos.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 146 行
H
146 行
/*************************************************************************
Copyright (C) Microsoft Corporation, 1996 - 1999
Module Name:
WmaOS.h
Abstract:
OS-specific data types and defines.
Author:
Raymond Cheng (raych) Aug 25, 1999
Revision History:
*************************************************************************/
#ifndef _WMA_OS_H_
#define _WMA_OS_H_
// **************************************************************************
// Common to All OS's
// **************************************************************************
// ----- Performance Timer Functions -----
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
typedef struct tagPERFTIMERINFO PERFTIMERINFO;
PERFTIMERINFO *PerfTimerNew(long lSamplesPerSecOutput);
void PerfTimerStart(PERFTIMERINFO *pInfo);
void PerfTimerStop(PERFTIMERINFO *pInfo, long lSamplesDecoded);
void PerfTimerStopElapsed(PERFTIMERINFO *pInfo);
void PerfTimerReport(PERFTIMERINFO *pInfo);
float fltPerfTimerDecodeTime(PERFTIMERINFO *pInfo);
void PerfTimerFree(PERFTIMERINFO *pInfo);
#ifdef __cplusplus
}
#endif // __cplusplus
// ----- Debug Infrastructure Functions and Macros -----
void TraceInfo(const char *pszFmt, ...);
#define _DEBUG
#ifdef _DEBUG
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
void TraceInfoHelper(const char *pszFile, int iLine, const char *pszFmt, ...);
WMARESULT MyOutputDbgStr(WMARESULT wmaReturn, const char *pszFmt, ...);
#ifdef __cplusplus
}
#endif // __cplusplus
// raych: The __FILE__ and __LINE__ might cause cross-platform compiler problems. Fix later...
#define TraceInfo0(text) TraceInfoHelper(__FILE__, __LINE__, text)
#define TraceInfo1(text,one) TraceInfoHelper(__FILE__, __LINE__, text, one)
#define TraceInfo2(text,one,two) TraceInfoHelper(__FILE__, __LINE__, text, one, two)
#define TraceInfo3(text,one,two,three) \
TraceInfoHelper(__FILE__, __LINE__, text, one, two, three)
#define TraceInfo4(text,one,two,three,four) \
TraceInfoHelper(__FILE__, __LINE__, text, one, two, three, four)
#define TraceInfo5(text,one,two,three,four,five) \
TraceInfoHelper(__FILE__, __LINE__, text, one, two, three, four, five)
#define TraceResult(code) (code)
#define TraceError(code) { /* wmaFOOFOO to avoid naming collisions */ \
WMARESULT wmaFOOFOO = (code); \
if (WMA_FAILED(wmaFOOFOO)) \
TraceResult(wmaFOOFOO); \
}
#else // _DEBUG
#define TraceInfo0(text)
#define TraceInfo1(text,one)
#define TraceInfo2(text,one,two)
#define TraceResult(code)
#define TraceError(code)
#endif // _DEBUG
//#define TRACEWMA_EXIT(wmaResult, action) \
// (wmaResult) = (action); \
// if (WMA_FAILED(wmaResult)) \
// { \
// TraceResult(wmaResult); \
// goto exit; \
// } else {}
#define TRACEWMA_EXIT(wmaResult, action) \
(wmaResult) = (action); \
if (WMA_FAILED(wmaResult)) \
{ \
goto exit; \
} else {}
//#define ASSERTWMA_EXIT(wmaResult, action) \
// (wmaResult) = (action); \
// if (WMA_FAILED(wmaResult)) \
// { \
// DEBUG_ONLY(DEBUG_BREAK()); /* assert(WMAB_FALSE); */ \
// TraceResult(wmaResult); \
// goto exit; \
// } else {}
#define ASSERTWMA_EXIT(wmaResult, action) \
(wmaResult) = (action); \
if (WMA_FAILED(wmaResult)) \
{ \
goto exit; \
} else {}
#define CHECKWMA_EXIT(wmaResult) \
if (WMA_FAILED(wmaResult)) \
{ \
TraceResult(wmaResult); \
goto exit; \
} else {}
#define TRACEWMA_RET(wmaResult, action) \
(wmaResult) = (action); \
if (WMA_FAILED(wmaResult)) \
{ \
return TraceResult(wmaResult); \
} else {}
// **************************************************************************
// Overridable Macros (optimized for some platforms, but not all)
// **************************************************************************
#define OUTPUT_DEBUG_STRING(sz) printf(sz)
#undef DEBUG_BREAK
#define DEBUG_BREAK()
#endif // _WMA_OS_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?