summaryrefslogtreecommitdiffstats
path: root/thirdparties/win32/include/directshow/wxdebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/win32/include/directshow/wxdebug.h')
-rwxr-xr-xthirdparties/win32/include/directshow/wxdebug.h265
1 files changed, 135 insertions, 130 deletions
diff --git a/thirdparties/win32/include/directshow/wxdebug.h b/thirdparties/win32/include/directshow/wxdebug.h
index 62efffb..29478de 100755
--- a/thirdparties/win32/include/directshow/wxdebug.h
+++ b/thirdparties/win32/include/directshow/wxdebug.h
@@ -51,12 +51,13 @@ enum { LOG_TIMING = 0x01, // Timing and performance measurements
LOG_CUSTOM3 = 0x80,
LOG_CUSTOM4 = 0x100,
LOG_CUSTOM5 = 0x200,
-};
+ };
#define LOG_FORCIBLY_SET 0x80000000
enum { CDISP_HEX = 0x01,
- CDISP_DEC = 0x02};
+ CDISP_DEC = 0x02
+ };
// For each object created derived from CBaseObject (in debug builds) we
// create a descriptor that holds it's name (statically allocated memory)
@@ -75,148 +76,148 @@ typedef struct tag_ObjectDesc {
#ifdef DEBUG
- #define NAME(x) TEXT(x)
+#define NAME(x) TEXT(x)
- // These are used internally by the debug library (PRIVATE)
+// These are used internally by the debug library (PRIVATE)
- void WINAPI DbgInitKeyLevels(HKEY hKey, bool fTakeMax);
- void WINAPI DbgInitGlobalSettings(bool fTakeMax);
- void WINAPI DbgInitModuleSettings(bool fTakeMax);
- void WINAPI DbgInitModuleName();
- DWORD WINAPI DbgRegisterObjectCreation(
- LPCSTR szObjectName, LPCWSTR wszObjectName);
+void WINAPI DbgInitKeyLevels(HKEY hKey, bool fTakeMax);
+void WINAPI DbgInitGlobalSettings(bool fTakeMax);
+void WINAPI DbgInitModuleSettings(bool fTakeMax);
+void WINAPI DbgInitModuleName();
+DWORD WINAPI DbgRegisterObjectCreation(
+ LPCSTR szObjectName, LPCWSTR wszObjectName);
- BOOL WINAPI DbgRegisterObjectDestruction(DWORD dwCookie);
+BOOL WINAPI DbgRegisterObjectDestruction(DWORD dwCookie);
- // These are the PUBLIC entry points
+// These are the PUBLIC entry points
- BOOL WINAPI DbgCheckModuleLevel(DWORD Type,DWORD Level);
- void WINAPI DbgSetModuleLevel(DWORD Type,DWORD Level);
- void WINAPI DbgSetAutoRefreshLevels(bool fAuto);
+BOOL WINAPI DbgCheckModuleLevel(DWORD Type,DWORD Level);
+void WINAPI DbgSetModuleLevel(DWORD Type,DWORD Level);
+void WINAPI DbgSetAutoRefreshLevels(bool fAuto);
- // Initialise the library with the module handle
+// Initialise the library with the module handle
- void WINAPI DbgInitialise(HINSTANCE hInst);
- void WINAPI DbgTerminate();
+void WINAPI DbgInitialise(HINSTANCE hInst);
+void WINAPI DbgTerminate();
- void WINAPI DbgDumpObjectRegister();
+void WINAPI DbgDumpObjectRegister();
- // Display error and logging to the user
+// Display error and logging to the user
- void WINAPI DbgAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
- void WINAPI DbgBreakPoint(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
- void WINAPI DbgBreakPoint(LPCTSTR pFileName,INT iLine,__format_string LPCTSTR szFormatString,...);
+void WINAPI DbgAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+void WINAPI DbgBreakPoint(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+void WINAPI DbgBreakPoint(LPCTSTR pFileName,INT iLine,__format_string LPCTSTR szFormatString,...);
- void WINAPI DbgKernelAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
- void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCTSTR pFormat,...);
+void WINAPI DbgKernelAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCTSTR pFormat,...);
#ifdef UNICODE
- void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCSTR pFormat,...);
- void WINAPI DbgAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
- void WINAPI DbgBreakPoint(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
- void WINAPI DbgKernelAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCSTR pFormat,...);
+void WINAPI DbgAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+void WINAPI DbgBreakPoint(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+void WINAPI DbgKernelAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
#endif
- void WINAPI DbgOutString(LPCTSTR psz);
+void WINAPI DbgOutString(LPCTSTR psz);
- // Debug infinite wait stuff
- DWORD WINAPI DbgWaitForSingleObject(HANDLE h);
- DWORD WINAPI DbgWaitForMultipleObjects(DWORD nCount,
- __in_ecount(nCount) CONST HANDLE *lpHandles,
- BOOL bWaitAll);
- void WINAPI DbgSetWaitTimeout(DWORD dwTimeout);
+// Debug infinite wait stuff
+DWORD WINAPI DbgWaitForSingleObject(HANDLE h);
+DWORD WINAPI DbgWaitForMultipleObjects(DWORD nCount,
+ __in_ecount(nCount) CONST HANDLE *lpHandles,
+ BOOL bWaitAll);
+void WINAPI DbgSetWaitTimeout(DWORD dwTimeout);
#ifdef __strmif_h__
- // Display a media type: Terse at level 2, verbose at level 5
- void WINAPI DisplayType(LPCTSTR label, const AM_MEDIA_TYPE *pmtIn);
+// Display a media type: Terse at level 2, verbose at level 5
+void WINAPI DisplayType(LPCTSTR label, const AM_MEDIA_TYPE *pmtIn);
- // Dump lots of information about a filter graph
- void WINAPI DumpGraph(IFilterGraph *pGraph, DWORD dwLevel);
+// Dump lots of information about a filter graph
+void WINAPI DumpGraph(IFilterGraph *pGraph, DWORD dwLevel);
#endif
- #define KASSERT(_x_) if (!(_x_)) \
+#define KASSERT(_x_) if (!(_x_)) \
DbgKernelAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
- // Break on the debugger without putting up a message box
- // message goes to debugger instead
+// Break on the debugger without putting up a message box
+// message goes to debugger instead
- #define KDbgBreak(_x_) \
+#define KDbgBreak(_x_) \
DbgKernelAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
- // We chose a common name for our ASSERT macro, MFC also uses this name
- // So long as the implementation evaluates the condition and handles it
- // then we will be ok. Rather than override the behaviour expected we
- // will leave whatever first defines ASSERT as the handler (i.e. MFC)
- #ifndef ASSERT
- #define ASSERT(_x_) if (!(_x_)) \
+// We chose a common name for our ASSERT macro, MFC also uses this name
+// So long as the implementation evaluates the condition and handles it
+// then we will be ok. Rather than override the behaviour expected we
+// will leave whatever first defines ASSERT as the handler (i.e. MFC)
+#ifndef ASSERT
+#define ASSERT(_x_) if (!(_x_)) \
DbgAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
- #endif
+#endif
- #define DbgAssertAligned( _ptr_, _alignment_ ) ASSERT( ((DWORD_PTR) (_ptr_)) % (_alignment_) == 0)
+#define DbgAssertAligned( _ptr_, _alignment_ ) ASSERT( ((DWORD_PTR) (_ptr_)) % (_alignment_) == 0)
- // Put up a message box informing the user of a halt
- // condition in the program
+// Put up a message box informing the user of a halt
+// condition in the program
- #define DbgBreak(_x_) \
+#define DbgBreak(_x_) \
DbgBreakPoint(TEXT(#_x_),TEXT(__FILE__),__LINE__)
- #define EXECUTE_ASSERT(_x_) ASSERT(_x_)
- #define DbgLog(_x_) DbgLogInfo _x_
- // MFC style trace macros
+#define EXECUTE_ASSERT(_x_) ASSERT(_x_)
+#define DbgLog(_x_) DbgLogInfo _x_
+// MFC style trace macros
- #define NOTE(_x_) DbgLog((LOG_TRACE,5,TEXT(_x_)))
- #define NOTE1(_x_,a) DbgLog((LOG_TRACE,5,TEXT(_x_),a))
- #define NOTE2(_x_,a,b) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b))
- #define NOTE3(_x_,a,b,c) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c))
- #define NOTE4(_x_,a,b,c,d) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d))
- #define NOTE5(_x_,a,b,c,d,e) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d,e))
+#define NOTE(_x_) DbgLog((LOG_TRACE,5,TEXT(_x_)))
+#define NOTE1(_x_,a) DbgLog((LOG_TRACE,5,TEXT(_x_),a))
+#define NOTE2(_x_,a,b) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b))
+#define NOTE3(_x_,a,b,c) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c))
+#define NOTE4(_x_,a,b,c,d) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d))
+#define NOTE5(_x_,a,b,c,d,e) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d,e))
#else
- // Retail builds make public debug functions inert - WARNING the source
- // files do not define or build any of the entry points in debug builds
- // (public entry points compile to nothing) so if you go trying to call
- // any of the private entry points in your source they won't compile
+// Retail builds make public debug functions inert - WARNING the source
+// files do not define or build any of the entry points in debug builds
+// (public entry points compile to nothing) so if you go trying to call
+// any of the private entry points in your source they won't compile
- #define NAME(_x_) ((LPTSTR) NULL)
+#define NAME(_x_) ((LPTSTR) NULL)
- #define DbgInitialise(hInst)
- #define DbgTerminate()
- #define DbgLog(_x_) 0
- #define DbgOutString(psz)
- #define DbgAssertAligned( _ptr_, _alignment_ ) 0
+#define DbgInitialise(hInst)
+#define DbgTerminate()
+#define DbgLog(_x_) 0
+#define DbgOutString(psz)
+#define DbgAssertAligned( _ptr_, _alignment_ ) 0
- #define DbgRegisterObjectCreation(pObjectName)
- #define DbgRegisterObjectDestruction(dwCookie)
- #define DbgDumpObjectRegister()
+#define DbgRegisterObjectCreation(pObjectName)
+#define DbgRegisterObjectDestruction(dwCookie)
+#define DbgDumpObjectRegister()
- #define DbgCheckModuleLevel(Type,Level)
- #define DbgSetModuleLevel(Type,Level)
- #define DbgSetAutoRefreshLevels(fAuto)
+#define DbgCheckModuleLevel(Type,Level)
+#define DbgSetModuleLevel(Type,Level)
+#define DbgSetAutoRefreshLevels(fAuto)
- #define DbgWaitForSingleObject(h) WaitForSingleObject(h, INFINITE)
- #define DbgWaitForMultipleObjects(nCount, lpHandles, bWaitAll) \
+#define DbgWaitForSingleObject(h) WaitForSingleObject(h, INFINITE)
+#define DbgWaitForMultipleObjects(nCount, lpHandles, bWaitAll) \
WaitForMultipleObjects(nCount, lpHandles, bWaitAll, INFINITE)
- #define DbgSetWaitTimeout(dwTimeout)
+#define DbgSetWaitTimeout(dwTimeout)
- #define KDbgBreak(_x_)
- #define DbgBreak(_x_)
+#define KDbgBreak(_x_)
+#define DbgBreak(_x_)
- #define KASSERT(_x_) ((void)0)
- #ifndef ASSERT
- #define ASSERT(_x_) ((void)0)
- #endif
- #define EXECUTE_ASSERT(_x_) ((void)(_x_))
+#define KASSERT(_x_) ((void)0)
+#ifndef ASSERT
+#define ASSERT(_x_) ((void)0)
+#endif
+#define EXECUTE_ASSERT(_x_) ((void)(_x_))
- // MFC style trace macros
+// MFC style trace macros
- #define NOTE(_x_) ((void)0)
- #define NOTE1(_x_,a) ((void)0)
- #define NOTE2(_x_,a,b) ((void)0)
- #define NOTE3(_x_,a,b,c) ((void)0)
- #define NOTE4(_x_,a,b,c,d) ((void)0)
- #define NOTE5(_x_,a,b,c,d,e) ((void)0)
+#define NOTE(_x_) ((void)0)
+#define NOTE1(_x_,a) ((void)0)
+#define NOTE2(_x_,a,b) ((void)0)
+#define NOTE3(_x_,a,b,c) ((void)0)
+#define NOTE4(_x_,a,b,c,d) ((void)0)
+#define NOTE5(_x_,a,b,c,d,e) ((void)0)
- #define DisplayType(label, pmtIn) ((void)0)
- #define DumpGraph(pGraph, label) ((void)0)
+#define DisplayType(label, pmtIn) ((void)0)
+#define DumpGraph(pGraph, label) ((void)0)
#endif
@@ -246,37 +247,38 @@ typedef struct tag_ObjectDesc {
#ifdef _OBJBASE_H_
- // Outputting GUID names. If you want to include the name
- // associated with a GUID (eg CLSID_...) then
- //
- // GuidNames[yourGUID]
- //
- // Returns the name defined in uuids.h as a string
-
- typedef struct {
- CHAR *szName;
- GUID guid;
- } GUID_STRING_ENTRY;
-
- class CGuidNameList {
- public:
- CHAR *operator [] (const GUID& guid);
- };
+// Outputting GUID names. If you want to include the name
+// associated with a GUID (eg CLSID_...) then
+//
+// GuidNames[yourGUID]
+//
+// Returns the name defined in uuids.h as a string
- extern CGuidNameList GuidNames;
+typedef struct {
+ CHAR *szName;
+ GUID guid;
+} GUID_STRING_ENTRY;
+
+class CGuidNameList
+{
+public:
+ CHAR *operator [] (const GUID& guid);
+};
+
+extern CGuidNameList GuidNames;
#endif
#ifndef REMIND
- // REMIND macro - generates warning as reminder to complete coding
- // (eg) usage:
- //
- // #pragma message (REMIND("Add automation support"))
+// REMIND macro - generates warning as reminder to complete coding
+// (eg) usage:
+//
+// #pragma message (REMIND("Add automation support"))
- #define QUOTE(x) #x
- #define QQUOTE(y) QUOTE(y)
- #define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
+#define QUOTE(x) #x
+#define QQUOTE(y) QUOTE(y)
+#define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
#endif
// Method to display objects in a useful format
@@ -289,7 +291,9 @@ typedef struct tag_ObjectDesc {
class CDispBasic
{
public:
- CDispBasic() { m_pString = m_String; };
+ CDispBasic() {
+ m_pString = m_String;
+ };
~CDispBasic();
protected:
PTCHAR m_pString; // normally points to m_String... unless too much data
@@ -311,8 +315,7 @@ public:
~CDisp();
// Implement cast to (LPCTSTR) as parameter to logger
- operator LPCTSTR()
- {
+ operator LPCTSTR() {
return (LPCTSTR)m_pString;
};
};
@@ -328,11 +331,13 @@ private:
static const TCHAR _szLeaving[];
public:
CAutoTrace(LPCTSTR szBlkName, const int level = 15)
- : _szBlkName(szBlkName), _level(level)
- {DbgLog((LOG_TRACE, _level, _szEntering, _szBlkName));}
+ : _szBlkName(szBlkName), _level(level) {
+ DbgLog((LOG_TRACE, _level, _szEntering, _szBlkName));
+ }
- ~CAutoTrace()
- {DbgLog((LOG_TRACE, _level, _szLeaving, _szBlkName));}
+ ~CAutoTrace() {
+ DbgLog((LOG_TRACE, _level, _szLeaving, _szBlkName));
+ }
};
#if defined (__FUNCTION__)
OpenPOWER on IntegriCloud