1 |
#ifndef _DSHOW_DEBUG_ |
#ifndef _DSHOW_DEBUG_ |
2 |
#define _DSHOW_DEBUG_ |
#define _DSHOW_DEBUG_ |
3 |
|
|
4 |
#ifdef _DEBUG |
#ifdef __cplusplus |
5 |
#include <stdio.h> /* vsprintf */ |
extern "C" { |
6 |
#define DPRINTF_BUF_SZ 1024 |
#endif |
|
static __inline void |
|
|
DPRINTF(char *fmt, ...) |
|
|
{ |
|
|
va_list args; |
|
|
char buf[DPRINTF_BUF_SZ]; |
|
7 |
|
|
8 |
va_start(args, fmt); |
void OutputDebugStringf(char *fmt, ...); |
9 |
vsprintf(buf, fmt, args); |
|
10 |
OutputDebugString(buf); |
#ifdef _DEBUG |
11 |
} |
#define DPRINTF OutputDebugStringf |
12 |
#else |
#else |
13 |
static __inline void |
static __inline void |
14 |
DPRINTF(char *fmt, ...) { } |
DPRINTF(char *fmt, ...) { } |
15 |
#endif |
#endif |
16 |
|
|
17 |
|
#ifdef __cplusplus |
18 |
|
} |
19 |
|
#endif |
20 |
|
|
21 |
#endif /* _DSHOW_DEBUG */ |
#endif /* _DSHOW_DEBUG */ |