mp_msg.h
Go to the documentation of this file.
1 /*
2  * This file is part of MPlayer.
3  *
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.
8  *
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.
13  *
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.
17  */
18 
19 #ifndef MPLAYER_MP_MSG_H
20 #define MPLAYER_MP_MSG_H
21 
22 #include <stdarg.h>
23 
24 // defined in mplayer.c and mencoder.c
25 extern int verbose;
26 
27 // verbosity elevel:
28 
29 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
30  * messages level MSGL_V and above should not be translated. */
31 
32 #define MSGL_FATAL 0 // will exit/abort
33 #define MSGL_ERR 1 // continues
34 #define MSGL_WARN 2 // only warning
35 #define MSGL_HINT 3 // short help message
36 #define MSGL_INFO 4 // -quiet
37 #define MSGL_STATUS 5 // v=0
38 #define MSGL_V 6 // v=1
39 #define MSGL_DBG2 7 // v=2
40 #define MSGL_DBG3 8 // v=3
41 #define MSGL_DBG4 9 // v=4
42 #define MSGL_DBG5 10 // v=5
43 
44 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
45 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
46 
47 // code/module:
48 
49 #define MSGT_GLOBAL 0 // common player stuff errors
50 #define MSGT_CPLAYER 1 // console player (mplayer.c)
51 #define MSGT_GPLAYER 2 // gui player
52 
53 #define MSGT_VO 3 // libvo
54 #define MSGT_AO 4 // libao
55 
56 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
57 #define MSGT_DS 6 // demux stream (add/read packet etc)
58 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
59 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
60 
61 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
62 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
63 
64 #define MSGT_CFGPARSER 11 // cfgparser.c
65 
66 #define MSGT_DECAUDIO 12 // av decoder
67 #define MSGT_DECVIDEO 13
68 
69 #define MSGT_SEEK 14 // seeking code
70 #define MSGT_WIN32 15 // win32 dll stuff
71 #define MSGT_OPEN 16 // open.c (stream opening)
72 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
73 
74 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
75 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
76 
77 #define MSGT_STREAM 20 // stream.c
78 #define MSGT_CACHE 21 // cache2.c
79 
80 #define MSGT_MENCODER 22
81 
82 #define MSGT_XACODEC 23 // XAnim codecs
83 
84 #define MSGT_TV 24 // TV input subsystem
85 
86 #define MSGT_OSDEP 25 // OS-dependent parts
87 
88 #define MSGT_SPUDEC 26 // spudec.c
89 
90 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
91 
92 #define MSGT_INPUT 28
93 
94 #define MSGT_VFILTER 29
95 
96 #define MSGT_OSD 30
97 
98 #define MSGT_NETWORK 31
99 
100 #define MSGT_CPUDETECT 32
101 
102 #define MSGT_CODECCFG 33
103 
104 #define MSGT_SWS 34
105 
106 #define MSGT_VOBSUB 35
107 #define MSGT_SUBREADER 36
108 
109 #define MSGT_AFILTER 37 // Audio filter messages
110 
111 #define MSGT_NETST 38 // Netstream
112 
113 #define MSGT_MUXER 39 // muxer layer
114 
115 #define MSGT_OSD_MENU 40
116 
117 #define MSGT_IDENTIFY 41 // -identify output
118 
119 #define MSGT_RADIO 42
120 
121 #define MSGT_ASS 43 // libass messages
122 
123 #define MSGT_LOADER 44 // dll loader messages
124 
125 #define MSGT_STATUSLINE 45 // playback/encoding status line
126 
127 #define MSGT_TELETEXT 46 // Teletext decoder
128 
129 #define MSGT_MAX 64
130 
131 
132 extern char *ff_mp_msg_charset;
133 extern int ff_mp_msg_color;
134 extern int ff_mp_msg_module;
135 
136 extern int ff_mp_msg_levels[MSGT_MAX];
137 extern int ff_mp_msg_level_all;
138 
139 
140 void ff_mp_msg_init(void);
141 int ff_mp_msg_test(int mod, int lev);
142 
143 #include "config.h"
144 
145 void ff_mp_msg_va(int mod, int lev, const char *format, va_list va);
146 #ifdef __GNUC__
147 void ff_mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
148 # ifdef MP_DEBUG
149 # define mp_dbg(mod,lev, args... ) ff_mp_msg(mod, lev, ## args )
150 # else
151  // only useful for developers, disable but check syntax
152 # define mp_dbg(mod,lev, args... ) do { if (0) ff_mp_msg(mod, lev, ## args ); } while (0)
153 # endif
154 #else // not GNU C
155 void ff_mp_msg(int mod, int lev, const char *format, ... );
156 # ifdef MP_DEBUG
157 # define mp_dbg(mod,lev, ... ) ff_mp_msg(mod, lev, __VA_ARGS__)
158 # else
159  // only useful for developers, disable but check syntax
160 # define mp_dbg(mod,lev, ... ) do { if (0) ff_mp_msg(mod, lev, __VA_ARGS__); } while (0)
161 # endif
162 #endif /* __GNUC__ */
163 
164 const char* ff_filename_recode(const char* filename);
165 
166 #endif /* MPLAYER_MP_MSG_H */
void ff_mp_msg_init(void)
char * ff_mp_msg_charset
static const float even_table[] __attribute__((aligned(8)))
const char * ff_filename_recode(const char *filename)
int ff_mp_msg_levels[MSGT_MAX]
int ff_mp_msg_level_all
#define MSGT_MAX
Definition: mp_msg.h:129
int verbose
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
void ff_mp_msg_va(int mod, int lev, const char *format, va_list va)
int ff_mp_msg_module
int ff_mp_msg_test(int mod, int lev)
Definition: vf_mp.c:283
void ff_mp_msg(int mod, int lev, const char *format,...)
Definition: vf_mp.c:275
int ff_mp_msg_color
printf("static const uint8_t my_array[100] = {\n")