Ignore svn changes r30217, r30218
[mplayer/glamo.git] / mp_msg.h
blobb7c5f9afcbea7b8c285d1e95ec14577b8bd79313
1 #ifndef MPLAYER_MP_MSG_H
2 #define MPLAYER_MP_MSG_H
4 #include <stdarg.h>
6 // defined in mplayer.c and mencoder.c
7 extern int verbose;
9 /* No-op macro to mark translated strings in the sources */
10 #define _(x) x
12 // verbosity elevel:
14 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
15 * messages level MSGL_V and above should not be translated. */
17 #define MSGL_FATAL 0 // will exit/abort
18 #define MSGL_ERR 1 // continues
19 #define MSGL_WARN 2 // only warning
20 #define MSGL_HINT 3 // short help message
21 #define MSGL_INFO 4 // -quiet
22 #define MSGL_STATUS 5 // v=0
23 #define MSGL_V 6 // v=1
24 #define MSGL_DBG2 7 // v=2
25 #define MSGL_DBG3 8 // v=3
26 #define MSGL_DBG4 9 // v=4
27 #define MSGL_DBG5 10 // v=5
29 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
30 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
32 // code/module:
34 #define MSGT_GLOBAL 0 // common player stuff errors
35 #define MSGT_CPLAYER 1 // console player (mplayer.c)
37 #define MSGT_VO 3 // libvo
38 #define MSGT_AO 4 // libao
40 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
41 #define MSGT_DS 6 // demux stream (add/read packet etc)
42 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
43 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
45 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
46 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
48 #define MSGT_CFGPARSER 11 // cfgparser.c
50 #define MSGT_DECAUDIO 12 // av decoder
51 #define MSGT_DECVIDEO 13
53 #define MSGT_SEEK 14 // seeking code
54 #define MSGT_WIN32 15 // win32 dll stuff
55 #define MSGT_OPEN 16 // open.c (stream opening)
56 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
58 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
59 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
61 #define MSGT_STREAM 20 // stream.c
62 #define MSGT_CACHE 21 // cache2.c
64 #define MSGT_MENCODER 22
66 #define MSGT_XACODEC 23 // XAnim codecs
68 #define MSGT_TV 24 // TV input subsystem
70 #define MSGT_OSDEP 25 // OS-dependent parts
72 #define MSGT_SPUDEC 26 // spudec.c
74 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
76 #define MSGT_INPUT 28
78 #define MSGT_VFILTER 29
80 #define MSGT_OSD 30
82 #define MSGT_NETWORK 31
84 #define MSGT_CPUDETECT 32
86 #define MSGT_CODECCFG 33
88 #define MSGT_SWS 34
90 #define MSGT_VOBSUB 35
91 #define MSGT_SUBREADER 36
93 #define MSGT_AFILTER 37 // Audio filter messages
95 #define MSGT_NETST 38 // Netstream
97 #define MSGT_MUXER 39 // muxer layer
99 #define MSGT_OSD_MENU 40
101 #define MSGT_IDENTIFY 41 // -identify output
103 #define MSGT_RADIO 42
105 #define MSGT_ASS 43 // libass messages
107 #define MSGT_LOADER 44 // dll loader messages
109 #define MSGT_STATUSLINE 45 // playback/encoding status line
111 #define MSGT_TELETEXT 46 // Teletext decoder
113 #define MSGT_MAX 64
115 void mp_msg_init(void);
116 int mp_msg_test(int mod, int lev);
118 #include "config.h"
120 char *mp_gtext(const char *string);
121 #define mp_tmsg mp_msg
123 void mp_msg_va(int mod, int lev, const char *format, va_list va);
125 #ifdef __GNUC__
126 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
127 # ifdef MP_DEBUG
128 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args )
129 # else
130 # define mp_dbg(mod,lev, args... ) /* only useful for developers */
131 # endif
132 #else // not GNU C
133 void mp_msg(int mod, int lev, const char *format, ... );
134 # ifdef MP_DEBUG
135 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
136 # else
137 # define mp_dbg(mod,lev, ... ) /* only useful for developers */
138 # endif
139 #endif /* __GNUC__ */
141 const char* filename_recode(const char* filename);
143 #endif /* MPLAYER_MP_MSG_H */