libavfilter/libmpcodecs/mp_msg.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of MPlayer.
00003  *
00004  * MPlayer is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * MPlayer is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License along
00015  * with MPlayer; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef MPLAYER_MP_MSG_H
00020 #define MPLAYER_MP_MSG_H
00021 
00022 #include <stdarg.h>
00023 
00024 // defined in mplayer.c and mencoder.c
00025 extern int verbose;
00026 
00027 // verbosity elevel:
00028 
00029 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
00030  * messages level MSGL_V and above should not be translated. */
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 // code/module:
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 *mp_msg_charset;
00133 extern int mp_msg_color;
00134 extern int mp_msg_module;
00135 
00136 extern int mp_msg_levels[MSGT_MAX];
00137 extern int mp_msg_level_all;
00138 
00139 
00140 void mp_msg_init(void);
00141 int mp_msg_test(int mod, int lev);
00142 
00143 #include "config.h"
00144 
00145 void mp_msg_va(int mod, int lev, const char *format, va_list va);
00146 #ifdef __GNUC__
00147 void 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... ) mp_msg(mod, lev, ## args )
00150 #   else
00151 #      define mp_dbg(mod,lev, args... ) /* only useful for developers */
00152 #   endif
00153 #else // not GNU C
00154 void mp_msg(int mod, int lev, const char *format, ... );
00155 #   ifdef MP_DEBUG
00156 #      define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
00157 #   else
00158 #      define mp_dbg(mod,lev, ... ) /* only useful for developers */
00159 #   endif
00160 #endif /* __GNUC__ */
00161 
00162 const char* filename_recode(const char* filename);
00163 
00164 #endif /* MPLAYER_MP_MSG_H */