Remove trailing whitespace from most files
[mplayer/glamo.git] / mp_msg.h
blob3a816039921a7ea82542d327ef1e458877ca8587
1 #ifndef MPLAYER_MP_MSG_H
2 #define MPLAYER_MP_MSG_H
4 // defined in mplayer.c and mencoder.c
5 extern int verbose;
7 /* No-op macro to mark translated strings in the sources */
8 #define _(x) x
10 // verbosity elevel:
12 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
13 * messages level MSGL_V and above should not be translated. */
15 #define MSGL_FATAL 0 // will exit/abort
16 #define MSGL_ERR 1 // continues
17 #define MSGL_WARN 2 // only warning
18 #define MSGL_HINT 3 // short help message
19 #define MSGL_INFO 4 // -quiet
20 #define MSGL_STATUS 5 // v=0
21 #define MSGL_V 6 // v=1
22 #define MSGL_DBG2 7 // v=2
23 #define MSGL_DBG3 8 // v=3
24 #define MSGL_DBG4 9 // v=4
25 #define MSGL_DBG5 10 // v=5
27 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
28 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
30 // code/module:
32 #define MSGT_GLOBAL 0 // common player stuff errors
33 #define MSGT_CPLAYER 1 // console player (mplayer.c)
34 #define MSGT_GPLAYER 2 // gui player
36 #define MSGT_VO 3 // libvo
37 #define MSGT_AO 4 // libao
39 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
40 #define MSGT_DS 6 // demux stream (add/read packet etc)
41 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
42 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
44 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
45 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
47 #define MSGT_CFGPARSER 11 // cfgparser.c
49 #define MSGT_DECAUDIO 12 // av decoder
50 #define MSGT_DECVIDEO 13
52 #define MSGT_SEEK 14 // seeking code
53 #define MSGT_WIN32 15 // win32 dll stuff
54 #define MSGT_OPEN 16 // open.c (stream opening)
55 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
57 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
58 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
60 #define MSGT_STREAM 20 // stream.c
61 #define MSGT_CACHE 21 // cache2.c
63 #define MSGT_MENCODER 22
65 #define MSGT_XACODEC 23 // XAnim codecs
67 #define MSGT_TV 24 // TV input subsystem
69 #define MSGT_OSDEP 25 // OS-dependent parts
71 #define MSGT_SPUDEC 26 // spudec.c
73 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
75 #define MSGT_INPUT 28
77 #define MSGT_VFILTER 29
79 #define MSGT_OSD 30
81 #define MSGT_NETWORK 31
83 #define MSGT_CPUDETECT 32
85 #define MSGT_CODECCFG 33
87 #define MSGT_SWS 34
89 #define MSGT_VOBSUB 35
90 #define MSGT_SUBREADER 36
92 #define MSGT_AFILTER 37 // Audio filter messages
94 #define MSGT_NETST 38 // Netstream
96 #define MSGT_MUXER 39 // muxer layer
98 #define MSGT_OSD_MENU 40
100 #define MSGT_IDENTIFY 41 // -identify output
102 #define MSGT_RADIO 42
104 #define MSGT_ASS 43 // libass messages
106 #define MSGT_LOADER 44 // dll loader messages
108 #define MSGT_STATUSLINE 45 // playback/encoding status line
110 #define MSGT_MAX 64
112 void mp_msg_init(void);
113 int mp_msg_test(int mod, int lev);
115 #include "config.h"
117 char *mp_gtext(const char *string);
118 #define mp_tmsg mp_msg
120 #ifdef __GNUC__
121 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
122 # ifdef MP_DEBUG
123 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args )
124 # else
125 # define mp_dbg(mod,lev, args... ) /* only useful for developers */
126 # endif
127 #else // not GNU C
128 void mp_msg(int mod, int lev, const char *format, ... );
129 # ifdef MP_DEBUG
130 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
131 # else
132 # define mp_dbg(mod,lev, ... ) /* only useful for developers */
133 # endif
134 #endif /* __GNUC__ */
136 const char* filename_recode(const char* filename);
138 #endif /* MPLAYER_MP_MSG_H */