00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MPLAYER_MP_MSG_H
00020 #define MPLAYER_MP_MSG_H
00021
00022 #include <stdarg.h>
00023
00024
00025 extern int verbose;
00026
00027
00028
00029
00030
00031
00032 #define MSGL_FATAL 0 // will exit/abort
00033 #define MSGL_ERR 1 // continues
00034 #define MSGL_WARN 2 // only warning
00035 #define MSGL_HINT 3 // short help message
00036 #define MSGL_INFO 4 // -quiet
00037 #define MSGL_STATUS 5 // v=0
00038 #define MSGL_V 6 // v=1
00039 #define MSGL_DBG2 7 // v=2
00040 #define MSGL_DBG3 8 // v=3
00041 #define MSGL_DBG4 9 // v=4
00042 #define MSGL_DBG5 10 // v=5
00043
00044 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
00045 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
00046
00047
00048
00049 #define MSGT_GLOBAL 0 // common player stuff errors
00050 #define MSGT_CPLAYER 1 // console player (mplayer.c)
00051 #define MSGT_GPLAYER 2 // gui player
00052
00053 #define MSGT_VO 3 // libvo
00054 #define MSGT_AO 4 // libao
00055
00056 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
00057 #define MSGT_DS 6 // demux stream (add/read packet etc)
00058 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
00059 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
00060
00061 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
00062 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
00063
00064 #define MSGT_CFGPARSER 11 // cfgparser.c
00065
00066 #define MSGT_DECAUDIO 12 // av decoder
00067 #define MSGT_DECVIDEO 13
00068
00069 #define MSGT_SEEK 14 // seeking code
00070 #define MSGT_WIN32 15 // win32 dll stuff
00071 #define MSGT_OPEN 16 // open.c (stream opening)
00072 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
00073
00074 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
00075 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
00076
00077 #define MSGT_STREAM 20 // stream.c
00078 #define MSGT_CACHE 21 // cache2.c
00079
00080 #define MSGT_MENCODER 22
00081
00082 #define MSGT_XACODEC 23 // XAnim codecs
00083
00084 #define MSGT_TV 24 // TV input subsystem
00085
00086 #define MSGT_OSDEP 25 // OS-dependent parts
00087
00088 #define MSGT_SPUDEC 26 // spudec.c
00089
00090 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
00091
00092 #define MSGT_INPUT 28
00093
00094 #define MSGT_VFILTER 29
00095
00096 #define MSGT_OSD 30
00097
00098 #define MSGT_NETWORK 31
00099
00100 #define MSGT_CPUDETECT 32
00101
00102 #define MSGT_CODECCFG 33
00103
00104 #define MSGT_SWS 34
00105
00106 #define MSGT_VOBSUB 35
00107 #define MSGT_SUBREADER 36
00108
00109 #define MSGT_AFILTER 37 // Audio filter messages
00110
00111 #define MSGT_NETST 38 // Netstream
00112
00113 #define MSGT_MUXER 39 // muxer layer
00114
00115 #define MSGT_OSD_MENU 40
00116
00117 #define MSGT_IDENTIFY 41 // -identify output
00118
00119 #define MSGT_RADIO 42
00120
00121 #define MSGT_ASS 43 // libass messages
00122
00123 #define MSGT_LOADER 44 // dll loader messages
00124
00125 #define MSGT_STATUSLINE 45 // playback/encoding status line
00126
00127 #define MSGT_TELETEXT 46 // Teletext decoder
00128
00129 #define MSGT_MAX 64
00130
00131
00132 extern char *ff_mp_msg_charset;
00133 extern int ff_mp_msg_color;
00134 extern int ff_mp_msg_module;
00135
00136 extern int ff_mp_msg_levels[MSGT_MAX];
00137 extern int ff_mp_msg_level_all;
00138
00139
00140 void ff_mp_msg_init(void);
00141 int ff_mp_msg_test(int mod, int lev);
00142
00143 #include "config.h"
00144
00145 void ff_mp_msg_va(int mod, int lev, const char *format, va_list va);
00146 #ifdef __GNUC__
00147 void ff_mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
00148 # ifdef MP_DEBUG
00149 # define mp_dbg(mod,lev, args... ) ff_mp_msg(mod, lev, ## args )
00150 # else
00151 # define mp_dbg(mod,lev, args... )
00152 # endif
00153 #else // not GNU C
00154 void ff_mp_msg(int mod, int lev, const char *format, ... );
00155 # ifdef MP_DEBUG
00156 # define mp_dbg(mod,lev, ... ) ff_mp_msg(mod, lev, __VA_ARGS__)
00157 # else
00158 # define mp_dbg(mod,lev, ... )
00159 # endif
00160 #endif
00161
00162 const char* ff_filename_recode(const char* filename);
00163
00164 #endif