Remove excessive ()
[mplayer.git] / mp_msg.h
blob44ce09e2fc243ae28213bae15812d2e5dbef9e80
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_MP_MSG_H
20 #define MPLAYER_MP_MSG_H
22 // defined in mplayer.c and mencoder.c
23 extern int verbose;
25 // verbosity elevel:
27 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
28 * messages level MSGL_V and above should not be translated. */
30 #define MSGL_FATAL 0 // will exit/abort
31 #define MSGL_ERR 1 // continues
32 #define MSGL_WARN 2 // only warning
33 #define MSGL_HINT 3 // short help message
34 #define MSGL_INFO 4 // -quiet
35 #define MSGL_STATUS 5 // v=0
36 #define MSGL_V 6 // v=1
37 #define MSGL_DBG2 7 // v=2
38 #define MSGL_DBG3 8 // v=3
39 #define MSGL_DBG4 9 // v=4
40 #define MSGL_DBG5 10 // v=5
42 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
43 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
45 // code/module:
47 #define MSGT_GLOBAL 0 // common player stuff errors
48 #define MSGT_CPLAYER 1 // console player (mplayer.c)
49 #define MSGT_GPLAYER 2 // gui player
51 #define MSGT_VO 3 // libvo
52 #define MSGT_AO 4 // libao
54 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
55 #define MSGT_DS 6 // demux stream (add/read packet etc)
56 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
57 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
59 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
60 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
62 #define MSGT_CFGPARSER 11 // cfgparser.c
64 #define MSGT_DECAUDIO 12 // av decoder
65 #define MSGT_DECVIDEO 13
67 #define MSGT_SEEK 14 // seeking code
68 #define MSGT_WIN32 15 // win32 dll stuff
69 #define MSGT_OPEN 16 // open.c (stream opening)
70 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
72 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
73 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
75 #define MSGT_STREAM 20 // stream.c
76 #define MSGT_CACHE 21 // cache2.c
78 #define MSGT_MENCODER 22
80 #define MSGT_XACODEC 23 // XAnim codecs
82 #define MSGT_TV 24 // TV input subsystem
84 #define MSGT_OSDEP 25 // OS-dependent parts
86 #define MSGT_SPUDEC 26 // spudec.c
88 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
90 #define MSGT_INPUT 28
92 #define MSGT_VFILTER 29
94 #define MSGT_OSD 30
96 #define MSGT_NETWORK 31
98 #define MSGT_CPUDETECT 32
100 #define MSGT_CODECCFG 33
102 #define MSGT_SWS 34
104 #define MSGT_VOBSUB 35
105 #define MSGT_SUBREADER 36
107 #define MSGT_AFILTER 37 // Audio filter messages
109 #define MSGT_NETST 38 // Netstream
111 #define MSGT_MUXER 39 // muxer layer
113 #define MSGT_OSD_MENU 40
115 #define MSGT_IDENTIFY 41 // -identify output
117 #define MSGT_RADIO 42
119 #define MSGT_ASS 43 // libass messages
121 #define MSGT_LOADER 44 // dll loader messages
123 #define MSGT_STATUSLINE 45 // playback/encoding status line
125 #define MSGT_TELETEXT 46 // Teletext decoder
127 #define MSGT_MAX 64
129 void mp_msg_init(void);
130 int mp_msg_test(int mod, int lev);
132 #include "config.h"
134 #ifdef __GNUC__
135 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
136 # ifdef MP_DEBUG
137 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args )
138 # else
139 # define mp_dbg(mod,lev, args... ) /* only useful for developers */
140 # endif
141 #else // not GNU C
142 void mp_msg(int mod, int lev, const char *format, ... );
143 # ifdef MP_DEBUG
144 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
145 # else
146 # define mp_dbg(mod,lev, ... ) /* only useful for developers */
147 # endif
148 #endif /* __GNUC__ */
150 const char* filename_recode(const char* filename);
152 #endif /* MPLAYER_MP_MSG_H */