4
* Copyright 2007 Novell, Inc. (http://www.novell.com)
6
* See the LICENSE file included with the distribution for details.
10
#ifndef __MOONLIGHT_DEBUG_H__
11
#define __MOONLIGHT_DEBUG_H__
24
#define MAX_STACK_FRAMES 30
26
char* get_stack_trace_prefix (const char* prefix);
27
void print_stack_trace_prefix (const char* prefix);
31
char* get_stack_trace ();
32
void print_stack_trace ();
33
void enable_vm_stack_trace ();
34
void print_gdb_trace ();
37
#define LOG_ALSA(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_ALSA)) printf (__VA_ARGS__);
38
#define LOG_ALSA_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_ALSA_EX)) printf (__VA_ARGS__);
39
#define LOG_AUDIO(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_AUDIO)) printf (__VA_ARGS__);
40
#define LOG_AUDIO_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_AUDIO_EX)) printf (__VA_ARGS__);
41
#define LOG_PULSE(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PULSE)) printf (__VA_ARGS__);
42
#define LOG_PULSE_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PULSE_EX)) printf (__VA_ARGS__);
43
#define LOG_HTTPSTREAMING(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_HTTPSTREAMING)) printf (__VA_ARGS__);
44
#define LOG_MARKERS(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MARKERS)) printf (__VA_ARGS__);
45
#define LOG_MARKERS_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MARKERS_EX)) printf (__VA_ARGS__);
46
#define LOG_MMS(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MMS)) printf (__VA_ARGS__);
47
#define LOG_MEDIAPLAYER(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MEDIAPLAYER)) printf (__VA_ARGS__);
48
#define LOG_MEDIAPLAYER_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MEDIAPLAYER_EX)) printf (__VA_ARGS__);
49
#define LOG_PIPELINE(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PIPELINE)) printf (__VA_ARGS__);
50
#define LOG_PIPELINE_ERROR(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PIPELINE_ERROR)) printf (__VA_ARGS__);
51
#define LOG_PIPELINE_ERROR_CONDITIONAL(x, ...) if (G_UNLIKELY (x && debug_flags & PIPELINE_ERROR)) printf (__VA_ARGS__);
52
#define LOG_FRAMEREADERLOOP(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_FRAMEREADERLOOP)) printf (__VA_ARGS__);
53
#define LOG_FFMPEG(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_FFMPEG)) printf(__VA_ARGS__);
54
#define LOG_UI(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_UI)) printf (__VA_ARGS__);
55
#define LOG_CODECS(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_CODECS)) printf (__VA_ARGS__);
56
#define LOG_DP(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_DP)) printf (__VA_ARGS__);
57
#define LOG_DOWNLOADER(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_DOWNLOADER)) printf (__VA_ARGS__);
58
#define LOG_FONT(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_FONT)) fprintf (__VA_ARGS__);
59
#define LOG_LAYOUT(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_LAYOUT)) fprintf (__VA_ARGS__);
60
#define LOG_MEDIA(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MEDIA)) printf (__VA_ARGS__);
61
#define LOG_MEDIAELEMENT(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MEDIAELEMENT)) printf (__VA_ARGS__);
62
#define LOG_MEDIAELEMENT_EX(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_MEDIAELEMENT_EX)) printf (__VA_ARGS__);
63
#define LOG_BUFFERING(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_BUFFERING)) printf (__VA_ARGS__);
64
#define LOG_PIPELINE_ASF(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_ASF)) printf (__VA_ARGS__);
65
#define LOG_PLAYLIST(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PLAYLIST)) printf (__VA_ARGS__);
66
#define LOG_PLAYLIST_WARN(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_PLAYLIST_WARN)) printf (__VA_ARGS__);
67
#define LOG_TEXT(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_TEXT)) fprintf (__VA_ARGS__);
68
#define LOG_XAML(...) if (G_UNLIKELY (debug_flags & RUNTIME_DEBUG_XAML)) printf (__VA_ARGS__);
73
#define LOG_ALSA_EX(...)
74
#define LOG_AUDIO(...)
75
#define LOG_AUDIO_EX(...)
76
#define LOG_PULSE(...)
77
#define LOG_PULSE_EX(...)
78
#define LOG_HTTPSTREAMING(...)
79
#define LOG_MARKERS(...)
80
#define LOG_MARKERS_EX(...)
82
#define LOG_MEDIAPLAYER(...)
83
#define LOG_MEDIAPLAYER_EX(...)
84
#define LOG_PIPELINE(...)
85
#define LOG_PIPELINE_ERROR(...)
86
#define LOG_PIPELINE_ERROR_CONDITIONAL(x, ...)
87
#define LOG_FRAMEREADERLOOP(...)
88
#define LOG_FFMPEG(...)
90
#define LOG_CODECS(...)
92
#define LOG_DOWNLOADER(...)
94
#define LOG_LAYOUT(...)
95
#define LOG_MEDIA(...)
96
#define LOG_MEDIAELEMENT(...)
97
#define LOG_MEDIAELEMENT_EX(...)
98
#define LOG_BUFFERING(...)
99
#define LOG_PIPELINE_ASF(...)
100
#define LOG_PLAYLIST(...)
101
#define LOG_PLAYLIST_WARN(...)
102
#define LOG_TEXT(...)
103
#define LOG_XAML(...)
108
#define print_stack_trace()
109
#define print_gdb_trace()
110
#define enable_vm_stack_trace()
114
#endif /* __MOONLIGHT_DEBUG_H */