|
1 |
|
2 #ifndef __RESAMPLE_DEBUG_H__ |
|
3 #define __RESAMPLE_DEBUG_H__ |
|
4 |
|
5 #if 0 |
|
6 enum |
|
7 { |
|
8 RESAMPLE_LEVEL_NONE = 0, |
|
9 RESAMPLE_LEVEL_ERROR, |
|
10 RESAMPLE_LEVEL_WARNING, |
|
11 RESAMPLE_LEVEL_INFO, |
|
12 RESAMPLE_LEVEL_DEBUG, |
|
13 RESAMPLE_LEVEL_LOG |
|
14 }; |
|
15 |
|
16 #define RESAMPLE_ERROR(...) \ |
|
17 RESAMPLE_DEBUG_LEVEL(RESAMPLE_LEVEL_ERROR, __VA_ARGS__) |
|
18 #define RESAMPLE_WARNING(...) \ |
|
19 RESAMPLE_DEBUG_LEVEL(RESAMPLE_LEVEL_WARNING, __VA_ARGS__) |
|
20 #define RESAMPLE_INFO(...) \ |
|
21 RESAMPLE_DEBUG_LEVEL(RESAMPLE_LEVEL_INFO, __VA_ARGS__) |
|
22 #define RESAMPLE_DEBUG(...) \ |
|
23 RESAMPLE_DEBUG_LEVEL(RESAMPLE_LEVEL_DEBUG, __VA_ARGS__) |
|
24 #define RESAMPLE_LOG(...) \ |
|
25 RESAMPLE_DEBUG_LEVEL(RESAMPLE_LEVEL_LOG, __VA_ARGS__) |
|
26 |
|
27 #define RESAMPLE_DEBUG_LEVEL(level,...) \ |
|
28 resample_debug_log ((level), __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__) |
|
29 |
|
30 void resample_debug_log (int level, const char *file, const char *function, |
|
31 int line, const char *format, ...); |
|
32 void resample_debug_set_level (int level); |
|
33 int resample_debug_get_level (void); |
|
34 #else |
|
35 |
|
36 #include <gst/gst.h> |
|
37 |
|
38 GST_DEBUG_CATEGORY_EXTERN (libaudioresample_debug); |
|
39 #define GST_CAT_DEFAULT libaudioresample_debug |
|
40 |
|
41 #define RESAMPLE_ERROR GST_ERROR |
|
42 #define RESAMPLE_WARNING GST_WARNING |
|
43 #define RESAMPLE_INFO GST_INFO |
|
44 #define RESAMPLE_DEBUG GST_DEBUG |
|
45 #define RESAMPLE_LOG GST_LOG |
|
46 |
|
47 #define resample_debug_set_level(x) do { } while (0) |
|
48 |
|
49 #endif |
|
50 |
|
51 #endif |