2001-08-17 00:13:20 +02:00
|
|
|
|
2002-02-23 16:12:55 +01:00
|
|
|
#ifndef _MP_MSG_H
|
|
|
|
#define _MP_MSG_H
|
|
|
|
|
2004-11-25 23:24:00 +01:00
|
|
|
// defined in mplayer.c and mencoder.c
|
|
|
|
extern int verbose;
|
2001-08-17 02:39:49 +02:00
|
|
|
|
2001-08-17 00:13:20 +02:00
|
|
|
// verbosity elevel:
|
|
|
|
|
2006-03-27 08:59:00 +02:00
|
|
|
/* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
|
|
|
|
* messages level MSGL_V and above should not be translated. */
|
2001-08-17 02:39:49 +02:00
|
|
|
|
2001-08-17 00:13:20 +02:00
|
|
|
#define MSGL_FATAL 0 // will exit/abort
|
2001-08-17 00:39:46 +02:00
|
|
|
#define MSGL_ERR 1 // continues
|
2001-08-17 00:13:20 +02:00
|
|
|
#define MSGL_WARN 2 // only warning
|
2001-08-17 02:39:49 +02:00
|
|
|
#define MSGL_HINT 3 // short help message
|
|
|
|
#define MSGL_INFO 4 // -quiet
|
|
|
|
#define MSGL_STATUS 5 // v=0
|
|
|
|
#define MSGL_V 6 // v=1
|
|
|
|
#define MSGL_DBG2 7 // v=2
|
|
|
|
#define MSGL_DBG3 8 // v=3
|
|
|
|
#define MSGL_DBG4 9 // v=4
|
2006-03-24 02:32:04 +01:00
|
|
|
#define MSGL_DBG5 10 // v=5
|
2001-08-17 00:13:20 +02:00
|
|
|
|
2004-08-24 21:36:17 +02:00
|
|
|
#define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
|
|
|
|
#define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
|
|
|
|
|
2001-08-17 00:13:20 +02:00
|
|
|
// code/module:
|
|
|
|
|
2001-08-17 02:39:49 +02:00
|
|
|
#define MSGT_GLOBAL 0 // common player stuff errors
|
|
|
|
#define MSGT_CPLAYER 1 // console player (mplayer.c)
|
2001-08-17 00:13:20 +02:00
|
|
|
#define MSGT_GPLAYER 2 // gui player
|
|
|
|
|
|
|
|
#define MSGT_VO 3 // libvo
|
|
|
|
#define MSGT_AO 4 // libao
|
|
|
|
|
|
|
|
#define MSGT_DEMUXER 5 // demuxer.c (general stuff)
|
|
|
|
#define MSGT_DS 6 // demux stream (add/read packet etc)
|
|
|
|
#define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
|
2001-08-17 00:39:46 +02:00
|
|
|
#define MSGT_HEADER 8 // fileformat-specific header (*header.c)
|
2001-08-17 00:13:20 +02:00
|
|
|
|
2001-08-17 02:39:49 +02:00
|
|
|
#define MSGT_AVSYNC 9 // mplayer.c timer stuff
|
|
|
|
#define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
|
|
|
|
|
|
|
|
#define MSGT_CFGPARSER 11 // cfgparser.c
|
|
|
|
|
|
|
|
#define MSGT_DECAUDIO 12 // av decoder
|
|
|
|
#define MSGT_DECVIDEO 13
|
|
|
|
|
|
|
|
#define MSGT_SEEK 14 // seeking code
|
|
|
|
#define MSGT_WIN32 15 // win32 dll stuff
|
|
|
|
#define MSGT_OPEN 16 // open.c (stream opening)
|
2001-08-20 22:14:10 +02:00
|
|
|
#define MSGT_DVD 17 // open.c (DVD init/read/seek)
|
2001-08-17 02:39:49 +02:00
|
|
|
|
2001-09-26 23:35:14 +02:00
|
|
|
#define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
|
2002-03-19 14:30:16 +01:00
|
|
|
#define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
|
2001-09-26 23:35:14 +02:00
|
|
|
|
|
|
|
#define MSGT_STREAM 20 // stream.c
|
2001-11-09 23:04:09 +01:00
|
|
|
#define MSGT_CACHE 21 // cache2.c
|
2001-09-26 23:35:14 +02:00
|
|
|
|
2001-11-02 02:35:27 +01:00
|
|
|
#define MSGT_MENCODER 22
|
|
|
|
|
2001-11-09 23:04:09 +01:00
|
|
|
#define MSGT_XACODEC 23 // XAnim codecs
|
|
|
|
|
|
|
|
#define MSGT_TV 24 // TV input subsystem
|
|
|
|
|
2001-11-23 17:09:05 +01:00
|
|
|
#define MSGT_OSDEP 25 // OS Dependant parts (linux/ for now)
|
|
|
|
|
2001-12-28 02:09:28 +01:00
|
|
|
#define MSGT_SPUDEC 26 // spudec.c
|
|
|
|
|
2002-01-08 02:52:11 +01:00
|
|
|
#define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
|
|
|
|
|
2002-03-19 14:30:16 +01:00
|
|
|
#define MSGT_INPUT 28
|
|
|
|
|
2002-04-07 00:00:27 +02:00
|
|
|
#define MSGT_VFILTER 29
|
|
|
|
|
2002-04-15 21:17:12 +02:00
|
|
|
#define MSGT_OSD 30
|
|
|
|
|
2002-04-30 18:58:54 +02:00
|
|
|
#define MSGT_NETWORK 31
|
|
|
|
|
2002-05-02 12:52:30 +02:00
|
|
|
#define MSGT_CPUDETECT 32
|
|
|
|
|
|
|
|
#define MSGT_CODECCFG 33
|
|
|
|
|
|
|
|
#define MSGT_SWS 34
|
|
|
|
|
2002-05-18 01:47:27 +02:00
|
|
|
#define MSGT_VOBSUB 35
|
2002-06-04 01:23:03 +02:00
|
|
|
#define MSGT_SUBREADER 36
|
2002-05-18 01:47:27 +02:00
|
|
|
|
2002-10-01 08:45:08 +02:00
|
|
|
#define MSGT_AFILTER 37 // Audio filter messages
|
|
|
|
|
2003-04-06 19:18:26 +02:00
|
|
|
#define MSGT_NETST 38 // Netstream
|
|
|
|
|
2003-10-22 19:04:39 +02:00
|
|
|
#define MSGT_MUXER 39 // muxer layer
|
|
|
|
|
2006-03-25 20:24:21 +01:00
|
|
|
#define MSGT_OSD_MENU 40
|
|
|
|
|
2006-04-24 09:20:34 +02:00
|
|
|
#define MSGT_IDENTIFY 41 // -identify output
|
|
|
|
|
2001-08-17 00:13:20 +02:00
|
|
|
#define MSGT_MAX 64
|
|
|
|
|
2006-02-09 15:08:03 +01:00
|
|
|
void mp_msg_init(void);
|
2002-08-21 23:31:20 +02:00
|
|
|
int mp_msg_test(int mod, int lev);
|
2001-08-17 00:13:20 +02:00
|
|
|
|
2002-03-15 22:07:48 +01:00
|
|
|
#include "config.h"
|
|
|
|
|
2002-03-23 21:56:34 +01:00
|
|
|
#ifdef TARGET_OS2
|
|
|
|
// va_start/vsnprintf seems to be broken under OS2 :(
|
2003-01-15 12:16:33 +01:00
|
|
|
#define mp_msg(mod,lev, fmt, args... ) do{if((lev)<=mp_msg_levels[mod]) printf( fmt, ## args );}while(0)
|
2002-03-23 21:56:34 +01:00
|
|
|
#define mp_dbg(mod,lev, args... )
|
|
|
|
#else
|
|
|
|
|
2001-08-17 09:26:07 +02:00
|
|
|
#ifdef __GNUC__
|
2005-09-29 07:21:12 +02:00
|
|
|
void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
|
2005-09-30 07:57:59 +02:00
|
|
|
# ifdef MP_DEBUG
|
|
|
|
# define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args )
|
|
|
|
# else
|
|
|
|
# define mp_dbg(mod,lev, args... ) /* only usefull for developers */
|
|
|
|
# endif
|
2001-08-17 09:26:07 +02:00
|
|
|
#else // not GNU C
|
2005-09-29 07:21:12 +02:00
|
|
|
void mp_msg(int mod, int lev, const char *format, ... );
|
2005-09-30 07:57:59 +02:00
|
|
|
# ifdef MP_DEBUG
|
|
|
|
# define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
|
|
|
|
# else
|
|
|
|
# define mp_dbg(mod,lev, ... ) /* only usefull for developers */
|
|
|
|
# endif
|
2005-09-29 07:21:12 +02:00
|
|
|
#endif
|
2001-08-17 09:26:07 +02:00
|
|
|
|
2002-02-23 16:12:55 +01:00
|
|
|
|
|
|
|
#endif
|
2002-03-23 21:56:34 +01:00
|
|
|
#endif
|