Mercurial > mplayer.hg
annotate mp_msg.h @ 13852:be3261b2bcf4
icons for the GUI context menu
patch by Piero di Vita <scognito at acaro dot org>
author | diego |
---|---|
date | Tue, 02 Nov 2004 14:45:03 +0000 |
parents | 2d4f4444092d |
children | 4802041ab8e3 |
rev | line source |
---|---|
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
1 |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
2 #ifndef _MP_MSG_H |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
3 #define _MP_MSG_H |
1566 | 4 |
5 extern int verbose; // defined in mplayer.c | |
1562 | 6 |
7 // verbosity elevel: | |
8 | |
13365
2d4f4444092d
Translate up to MSGL_STATUS so all normal output is translated.
diego
parents:
13122
diff
changeset
|
9 // stuff from level MSGL_FATAL-MSGL_STATUS should be translated. |
1566 | 10 |
1562 | 11 #define MSGL_FATAL 0 // will exit/abort |
1563 | 12 #define MSGL_ERR 1 // continues |
1562 | 13 #define MSGL_WARN 2 // only warning |
1566 | 14 #define MSGL_HINT 3 // short help message |
15 #define MSGL_INFO 4 // -quiet | |
16 #define MSGL_STATUS 5 // v=0 | |
17 #define MSGL_V 6 // v=1 | |
18 #define MSGL_DBG2 7 // v=2 | |
19 #define MSGL_DBG3 8 // v=3 | |
20 #define MSGL_DBG4 9 // v=4 | |
1562 | 21 |
13122 | 22 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness |
23 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness | |
24 | |
1562 | 25 // code/module: |
26 | |
1566 | 27 #define MSGT_GLOBAL 0 // common player stuff errors |
28 #define MSGT_CPLAYER 1 // console player (mplayer.c) | |
1562 | 29 #define MSGT_GPLAYER 2 // gui player |
30 | |
31 #define MSGT_VO 3 // libvo | |
32 #define MSGT_AO 4 // libao | |
33 | |
34 #define MSGT_DEMUXER 5 // demuxer.c (general stuff) | |
35 #define MSGT_DS 6 // demux stream (add/read packet etc) | |
36 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c) | |
1563 | 37 #define MSGT_HEADER 8 // fileformat-specific header (*header.c) |
1562 | 38 |
1566 | 39 #define MSGT_AVSYNC 9 // mplayer.c timer stuff |
40 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff | |
41 | |
42 #define MSGT_CFGPARSER 11 // cfgparser.c | |
43 | |
44 #define MSGT_DECAUDIO 12 // av decoder | |
45 #define MSGT_DECVIDEO 13 | |
46 | |
47 #define MSGT_SEEK 14 // seeking code | |
48 #define MSGT_WIN32 15 // win32 dll stuff | |
49 #define MSGT_OPEN 16 // open.c (stream opening) | |
1593 | 50 #define MSGT_DVD 17 // open.c (DVD init/read/seek) |
1566 | 51 |
1973
5216f108cb4f
all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents:
1593
diff
changeset
|
52 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser) |
5198
a528f6c891b5
A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents:
5101
diff
changeset
|
53 #define MSGT_LIRC 19 // lirc_mp.c and input lirc driver |
1973
5216f108cb4f
all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents:
1593
diff
changeset
|
54 |
5216f108cb4f
all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents:
1593
diff
changeset
|
55 #define MSGT_STREAM 20 // stream.c |
2787 | 56 #define MSGT_CACHE 21 // cache2.c |
1973
5216f108cb4f
all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents:
1593
diff
changeset
|
57 |
2620 | 58 #define MSGT_MENCODER 22 |
59 | |
2787 | 60 #define MSGT_XACODEC 23 // XAnim codecs |
61 | |
62 #define MSGT_TV 24 // TV input subsystem | |
63 | |
3085 | 64 #define MSGT_OSDEP 25 // OS Dependant parts (linux/ for now) |
65 | |
3821 | 66 #define MSGT_SPUDEC 26 // spudec.c |
67 | |
4044 | 68 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c) |
69 | |
5198
a528f6c891b5
A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents:
5101
diff
changeset
|
70 #define MSGT_INPUT 28 |
a528f6c891b5
A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents:
5101
diff
changeset
|
71 |
5505 | 72 #define MSGT_VFILTER 29 |
73 | |
5638
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5505
diff
changeset
|
74 #define MSGT_OSD 30 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5505
diff
changeset
|
75 |
5915 | 76 #define MSGT_NETWORK 31 |
77 | |
5936 | 78 #define MSGT_CPUDETECT 32 |
79 | |
80 #define MSGT_CODECCFG 33 | |
81 | |
82 #define MSGT_SWS 34 | |
83 | |
6110 | 84 #define MSGT_VOBSUB 35 |
6296 | 85 #define MSGT_SUBREADER 36 |
6110 | 86 |
7568 | 87 #define MSGT_AFILTER 37 // Audio filter messages |
88 | |
9862 | 89 #define MSGT_NETST 38 // Netstream |
90 | |
11222 | 91 #define MSGT_MUXER 39 // muxer layer |
92 | |
1562 | 93 #define MSGT_MAX 64 |
94 | |
5220
4afbe13150e6
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
alex
parents:
5198
diff
changeset
|
95 void mp_msg_init(); |
4afbe13150e6
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
alex
parents:
5198
diff
changeset
|
96 void mp_msg_set_level(int verbose); |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
6296
diff
changeset
|
97 int mp_msg_test(int mod, int lev); |
1562 | 98 |
5101 | 99 #include "config.h" |
100 | |
5287 | 101 #ifdef TARGET_OS2 |
102 // va_start/vsnprintf seems to be broken under OS2 :( | |
8957
36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents:
7568
diff
changeset
|
103 #define mp_msg(mod,lev, fmt, args... ) do{if((lev)<=mp_msg_levels[mod]) printf( fmt, ## args );}while(0) |
5287 | 104 #define mp_dbg(mod,lev, args... ) |
105 #else | |
106 | |
5101 | 107 #ifdef USE_I18N |
108 #include <libintl.h> | |
5220
4afbe13150e6
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
alex
parents:
5198
diff
changeset
|
109 #include <locale.h> |
5101 | 110 #define mp_gettext(String) gettext(String) |
111 #else | |
112 #define mp_gettext(String) String | |
113 #endif | |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
114 |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
115 #ifdef __GNUC__ |
10736
3e57b9c079b6
Handle mp_msg like printf so compiler can report if missing/too much arguments or other errors happen. GCC only
alex
parents:
9862
diff
changeset
|
116 void mp_msg_c( int x, const char *format, ... ) __attribute__ ((format (printf, 2, 3))); |
8957
36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents:
7568
diff
changeset
|
117 #define mp_msg(mod,lev, args... ) mp_msg_c(((mod)<<8)|(lev), ## args ) |
1566 | 118 |
119 #ifdef MP_DEBUG | |
8957
36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents:
7568
diff
changeset
|
120 #define mp_dbg(mod,lev, args... ) mp_msg_c(((mod)<<8)|(lev), ## args ) |
1566 | 121 #else |
122 // these messages are only usefull for developers, disable them | |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
123 #define mp_dbg(mod,lev, args... ) |
1566 | 124 #endif |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
125 #else // not GNU C |
10736
3e57b9c079b6
Handle mp_msg like printf so compiler can report if missing/too much arguments or other errors happen. GCC only
alex
parents:
9862
diff
changeset
|
126 void mp_msg_c( int x, const char *format, ... ); |
8957
36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents:
7568
diff
changeset
|
127 #define mp_msg(mod,lev, ... ) mp_msg_c(((mod)<<8)|(lev), __VA_ARGS__) |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
128 |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
129 #ifdef MP_DEBUG |
8957
36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents:
7568
diff
changeset
|
130 #define mp_dbg(mod,lev, ... ) mp_msg_c(((mod)<<8)|(lev), __VA_ARGS__) |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
131 #else |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
132 // these messages are only usefull for developers, disable them |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
133 #define mp_dbg(mod,lev, ... ) |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
134 #endif |
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
135 #endif |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
136 |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
137 #endif |
5287 | 138 #endif |