annotate mp_msg.h @ 17965:a1dc210f20b3

use shifts instead of division. 15% faster hqdn3d
author lorenm
date Sun, 26 Mar 2006 21:32:52 +0000
parents c33dc00f0946
children 963062e18809
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
4
14046
4802041ab8e3 Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja <mplayer-patches@en-directo.net>
mosu
parents: 13365
diff changeset
5 // defined in mplayer.c and mencoder.c
4802041ab8e3 Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja <mplayer-patches@en-directo.net>
mosu
parents: 13365
diff changeset
6 extern int verbose;
4802041ab8e3 Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja <mplayer-patches@en-directo.net>
mosu
parents: 13365
diff changeset
7 extern int identify;
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
8
2caba2f48026 new message printing system
arpi
parents:
diff changeset
9 // verbosity elevel:
2caba2f48026 new message printing system
arpi
parents:
diff changeset
10
13365
2d4f4444092d Translate up to MSGL_STATUS so all normal output is translated.
diego
parents: 13122
diff changeset
11 // stuff from level MSGL_FATAL-MSGL_STATUS should be translated.
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
12
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
13 #define MSGL_FATAL 0 // will exit/abort
1563
0199567db534 constans shortend
arpi
parents: 1562
diff changeset
14 #define MSGL_ERR 1 // continues
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
15 #define MSGL_WARN 2 // only warning
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
16 #define MSGL_HINT 3 // short help message
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
17 #define MSGL_INFO 4 // -quiet
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
18 #define MSGL_STATUS 5 // v=0
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
19 #define MSGL_V 6 // v=1
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
20 #define MSGL_DBG2 7 // v=2
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
21 #define MSGL_DBG3 8 // v=3
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
22 #define MSGL_DBG4 9 // v=4
17930
81cbc8debd3c Add DBG5 verbosity level to prepare for upcoming mp_msg_test changes.
diego
parents: 17566
diff changeset
23 #define MSGL_DBG5 10 // v=5
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
24
13122
fcce0023bf55 printf -> mp_msg conversion, first steps
diego
parents: 11222
diff changeset
25 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
fcce0023bf55 printf -> mp_msg conversion, first steps
diego
parents: 11222
diff changeset
26 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
fcce0023bf55 printf -> mp_msg conversion, first steps
diego
parents: 11222
diff changeset
27
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
28 // code/module:
2caba2f48026 new message printing system
arpi
parents:
diff changeset
29
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
30 #define MSGT_GLOBAL 0 // common player stuff errors
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
31 #define MSGT_CPLAYER 1 // console player (mplayer.c)
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
32 #define MSGT_GPLAYER 2 // gui player
2caba2f48026 new message printing system
arpi
parents:
diff changeset
33
2caba2f48026 new message printing system
arpi
parents:
diff changeset
34 #define MSGT_VO 3 // libvo
2caba2f48026 new message printing system
arpi
parents:
diff changeset
35 #define MSGT_AO 4 // libao
2caba2f48026 new message printing system
arpi
parents:
diff changeset
36
2caba2f48026 new message printing system
arpi
parents:
diff changeset
37 #define MSGT_DEMUXER 5 // demuxer.c (general stuff)
2caba2f48026 new message printing system
arpi
parents:
diff changeset
38 #define MSGT_DS 6 // demux stream (add/read packet etc)
2caba2f48026 new message printing system
arpi
parents:
diff changeset
39 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
1563
0199567db534 constans shortend
arpi
parents: 1562
diff changeset
40 #define MSGT_HEADER 8 // fileformat-specific header (*header.c)
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
41
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
42 #define MSGT_AVSYNC 9 // mplayer.c timer stuff
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
43 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
44
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
45 #define MSGT_CFGPARSER 11 // cfgparser.c
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
46
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
47 #define MSGT_DECAUDIO 12 // av decoder
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
48 #define MSGT_DECVIDEO 13
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
49
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
50 #define MSGT_SEEK 14 // seeking code
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
51 #define MSGT_WIN32 15 // win32 dll stuff
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
52 #define MSGT_OPEN 16 // open.c (stream opening)
1593
9d405908f878 DVD added
arpi
parents: 1568
diff changeset
53 #define MSGT_DVD 17 // open.c (DVD init/read/seek)
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
54
1973
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1593
diff changeset
55 #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
56 #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
57
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1593
diff changeset
58 #define MSGT_STREAM 20 // stream.c
2787
8dfe10c9f15d fixes for vivo
alex
parents: 2620
diff changeset
59 #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
60
2620
e2f600293621 MSGT_MENCODER added
arpi
parents: 2370
diff changeset
61 #define MSGT_MENCODER 22
e2f600293621 MSGT_MENCODER added
arpi
parents: 2370
diff changeset
62
2787
8dfe10c9f15d fixes for vivo
alex
parents: 2620
diff changeset
63 #define MSGT_XACODEC 23 // XAnim codecs
8dfe10c9f15d fixes for vivo
alex
parents: 2620
diff changeset
64
8dfe10c9f15d fixes for vivo
alex
parents: 2620
diff changeset
65 #define MSGT_TV 24 // TV input subsystem
8dfe10c9f15d fixes for vivo
alex
parents: 2620
diff changeset
66
3085
f6247be96224 added MSGT_OSDEP
alex
parents: 2787
diff changeset
67 #define MSGT_OSDEP 25 // OS Dependant parts (linux/ for now)
f6247be96224 added MSGT_OSDEP
alex
parents: 2787
diff changeset
68
3821
a75add28f16c spudec added
arpi
parents: 3085
diff changeset
69 #define MSGT_SPUDEC 26 // spudec.c
a75add28f16c spudec added
arpi
parents: 3085
diff changeset
70
4044
5db51705d5c7 MSGT_PLAYTREE added
arpi
parents: 3821
diff changeset
71 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
5db51705d5c7 MSGT_PLAYTREE added
arpi
parents: 3821
diff changeset
72
5198
a528f6c891b5 A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents: 5101
diff changeset
73 #define MSGT_INPUT 28
a528f6c891b5 A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents: 5101
diff changeset
74
5505
72f080de9ce5 MSGT_VFILTER added
arpi
parents: 5287
diff changeset
75 #define MSGT_VFILTER 29
72f080de9ce5 MSGT_VFILTER added
arpi
parents: 5287
diff changeset
76
5638
86663f1b9b00 new osd code, use osd objs to follow changes and do minimal updates
arpi
parents: 5505
diff changeset
77 #define MSGT_OSD 30
86663f1b9b00 new osd code, use osd objs to follow changes and do minimal updates
arpi
parents: 5505
diff changeset
78
5915
f716aa9e2df2 Convert printf to mp_msg in the network layer
albeu
parents: 5638
diff changeset
79 #define MSGT_NETWORK 31
f716aa9e2df2 Convert printf to mp_msg in the network layer
albeu
parents: 5638
diff changeset
80
5936
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
81 #define MSGT_CPUDETECT 32
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
82
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
83 #define MSGT_CODECCFG 33
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
84
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
85 #define MSGT_SWS 34
d0f040d8f53c New MSGT for more printf to mp_msg
albeu
parents: 5915
diff changeset
86
6110
7bea806b9c5f Improvment for spu subtitles.
albeu
parents: 5936
diff changeset
87 #define MSGT_VOBSUB 35
6296
74115095d9fe msg/i18n fixes and some printf->mp_msg
arpi
parents: 6110
diff changeset
88 #define MSGT_SUBREADER 36
6110
7bea806b9c5f Improvment for spu subtitles.
albeu
parents: 5936
diff changeset
89
7568
d08513b9fed6 Adding new audio output filter layer libaf
anders
parents: 7058
diff changeset
90 #define MSGT_AFILTER 37 // Audio filter messages
d08513b9fed6 Adding new audio output filter layer libaf
anders
parents: 7058
diff changeset
91
9862
d172681d07eb 100L forgot this commit for netstream.
albeu
parents: 8957
diff changeset
92 #define MSGT_NETST 38 // Netstream
d172681d07eb 100L forgot this commit for netstream.
albeu
parents: 8957
diff changeset
93
11222
b82e3ecb11e0 some updates in muxer api
alex
parents: 10736
diff changeset
94 #define MSGT_MUXER 39 // muxer layer
b82e3ecb11e0 some updates in muxer api
alex
parents: 10736
diff changeset
95
17947
c33dc00f0946 Add a msg type for the osd menu.
albeu
parents: 17930
diff changeset
96 #define MSGT_OSD_MENU 40
c33dc00f0946 Add a msg type for the osd menu.
albeu
parents: 17930
diff changeset
97
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
98 #define MSGT_MAX 64
2caba2f48026 new message printing system
arpi
parents:
diff changeset
99
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 17106
diff changeset
100 void mp_msg_init(void);
7058
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 6296
diff changeset
101 int mp_msg_test(int mod, int lev);
1562
2caba2f48026 new message printing system
arpi
parents:
diff changeset
102
5101
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
103 #include "config.h"
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
104
5287
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
105 #ifdef TARGET_OS2
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
106 // 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
107 #define mp_msg(mod,lev, fmt, args... ) do{if((lev)<=mp_msg_levels[mod]) printf( fmt, ## args );}while(0)
5287
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
108 #define mp_dbg(mod,lev, args... )
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
109 #else
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
110
5101
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
111 #ifdef USE_I18N
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
112 #include <libintl.h>
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
113 #define mp_gettext(String) gettext(String)
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
114 #else
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
115 #define mp_gettext(String) String
870ba1ffdbf9 added mp_gettext macro for i18n
alex
parents: 4818
diff changeset
116 #endif
1568
2d4904c16667 modifications to use variable number of arguments in #define with GCC
atlka
parents: 1566
diff changeset
117
2d4904c16667 modifications to use variable number of arguments in #define with GCC
atlka
parents: 1566
diff changeset
118 #ifdef __GNUC__
16618
bad73cd81b23 mp_msg cleanup.
ods15
parents: 14542
diff changeset
119 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
16621
ods15
parents: 16618
diff changeset
120 # ifdef MP_DEBUG
ods15
parents: 16618
diff changeset
121 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args )
ods15
parents: 16618
diff changeset
122 # else
ods15
parents: 16618
diff changeset
123 # define mp_dbg(mod,lev, args... ) /* only usefull for developers */
ods15
parents: 16618
diff changeset
124 # endif
16618
bad73cd81b23 mp_msg cleanup.
ods15
parents: 14542
diff changeset
125 #else // not GNU C
bad73cd81b23 mp_msg cleanup.
ods15
parents: 14542
diff changeset
126 void mp_msg(int mod, int lev, const char *format, ... );
16621
ods15
parents: 16618
diff changeset
127 # ifdef MP_DEBUG
ods15
parents: 16618
diff changeset
128 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
ods15
parents: 16618
diff changeset
129 # else
ods15
parents: 16618
diff changeset
130 # define mp_dbg(mod,lev, ... ) /* only usefull for developers */
ods15
parents: 16618
diff changeset
131 # endif
16618
bad73cd81b23 mp_msg cleanup.
ods15
parents: 14542
diff changeset
132 #endif
1566
913c1ee56b4f updated
arpi
parents: 1563
diff changeset
133
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4044
diff changeset
134
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4044
diff changeset
135 #endif
5287
890a0abfe0b8 OS/2 workaround
arpi
parents: 5220
diff changeset
136 #endif