Mercurial > mplayer.hg
annotate mp_msg.h @ 33737:71c29e8ec68f
Move string functions from interface.c to string.c.
Additionally, change char parameter of gstrchr() to const and
rename parameter size of gstrncmp() n.
The Win32 GUI now needs gstrdup() defined before its first usage.
author | ib |
---|---|
date | Thu, 07 Jul 2011 08:32:10 +0000 |
parents | bf994e94e70a |
children |
rev | line source |
---|---|
30429
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
1 /* |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
2 * This file is part of MPlayer. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
3 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
7 * (at your option) any later version. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
8 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
12 * GNU General Public License for more details. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
13 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
17 */ |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29760
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_MP_MSG_H |
20 #define MPLAYER_MP_MSG_H | |
1566 | 21 |
32378
150df72e808f
Add a va_list version of mp_msg and use it to avoid yet another intermediate
reimar
parents:
31392
diff
changeset
|
22 #include <stdarg.h> |
150df72e808f
Add a va_list version of mp_msg and use it to avoid yet another intermediate
reimar
parents:
31392
diff
changeset
|
23 |
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
|
24 // 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
|
25 extern int verbose; |
1562 | 26 |
27 // verbosity elevel: | |
28 | |
17968 | 29 /* Only messages level MSGL_FATAL-MSGL_STATUS should be translated, |
30 * messages level MSGL_V and above should not be translated. */ | |
1566 | 31 |
1562 | 32 #define MSGL_FATAL 0 // will exit/abort |
1563 | 33 #define MSGL_ERR 1 // continues |
1562 | 34 #define MSGL_WARN 2 // only warning |
1566 | 35 #define MSGL_HINT 3 // short help message |
36 #define MSGL_INFO 4 // -quiet | |
37 #define MSGL_STATUS 5 // v=0 | |
38 #define MSGL_V 6 // v=1 | |
39 #define MSGL_DBG2 7 // v=2 | |
40 #define MSGL_DBG3 8 // v=3 | |
41 #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
|
42 #define MSGL_DBG5 10 // v=5 |
1562 | 43 |
13122 | 44 #define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness |
45 #define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness | |
46 | |
1562 | 47 // code/module: |
48 | |
1566 | 49 #define MSGT_GLOBAL 0 // common player stuff errors |
50 #define MSGT_CPLAYER 1 // console player (mplayer.c) | |
1562 | 51 #define MSGT_GPLAYER 2 // gui player |
52 | |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
53 #define MSGT_VO 3 // libvo |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
54 #define MSGT_AO 4 // libao |
1562 | 55 |
56 #define MSGT_DEMUXER 5 // demuxer.c (general stuff) | |
57 #define MSGT_DS 6 // demux stream (add/read packet etc) | |
58 #define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c) | |
1563 | 59 #define MSGT_HEADER 8 // fileformat-specific header (*header.c) |
1562 | 60 |
1566 | 61 #define MSGT_AVSYNC 9 // mplayer.c timer stuff |
62 #define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff | |
63 | |
64 #define MSGT_CFGPARSER 11 // cfgparser.c | |
65 | |
66 #define MSGT_DECAUDIO 12 // av decoder | |
67 #define MSGT_DECVIDEO 13 | |
68 | |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
69 #define MSGT_SEEK 14 // seeking code |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
70 #define MSGT_WIN32 15 // win32 dll stuff |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
71 #define MSGT_OPEN 16 // open.c (stream opening) |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
72 #define MSGT_DVD 17 // open.c (DVD init/read/seek) |
1566 | 73 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
74 #define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser) |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
75 #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
|
76 |
5216f108cb4f
all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents:
1593
diff
changeset
|
77 #define MSGT_STREAM 20 // stream.c |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
78 #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
|
79 |
2620 | 80 #define MSGT_MENCODER 22 |
81 | |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
82 #define MSGT_XACODEC 23 // XAnim codecs |
2787 | 83 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
84 #define MSGT_TV 24 // TV input subsystem |
2787 | 85 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
86 #define MSGT_OSDEP 25 // OS-dependent parts |
3085 | 87 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
32378
diff
changeset
|
88 #define MSGT_SPUDEC 26 // spudec.c |
3821 | 89 |
4044 | 90 #define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c) |
91 | |
5198
a528f6c891b5
A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents:
5101
diff
changeset
|
92 #define MSGT_INPUT 28 |
a528f6c891b5
A bug fix in the auto-repeat stuff + moved all printf to mp_msg
albeu
parents:
5101
diff
changeset
|
93 |
5505 | 94 #define MSGT_VFILTER 29 |
95 | |
5638
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5505
diff
changeset
|
96 #define MSGT_OSD 30 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5505
diff
changeset
|
97 |
5915 | 98 #define MSGT_NETWORK 31 |
99 | |
5936 | 100 #define MSGT_CPUDETECT 32 |
101 | |
102 #define MSGT_CODECCFG 33 | |
103 | |
104 #define MSGT_SWS 34 | |
105 | |
6110 | 106 #define MSGT_VOBSUB 35 |
6296 | 107 #define MSGT_SUBREADER 36 |
6110 | 108 |
7568 | 109 #define MSGT_AFILTER 37 // Audio filter messages |
110 | |
9862 | 111 #define MSGT_NETST 38 // Netstream |
112 | |
11222 | 113 #define MSGT_MUXER 39 // muxer layer |
114 | |
17947 | 115 #define MSGT_OSD_MENU 40 |
116 | |
18237
4231482179b6
Get ride of the several if(identify) messy lines and rearangment of some of the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three
reynaldo
parents:
18000
diff
changeset
|
117 #define MSGT_IDENTIFY 41 // -identify output |
4231482179b6
Get ride of the several if(identify) messy lines and rearangment of some of the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three
reynaldo
parents:
18000
diff
changeset
|
118 |
19568
bd821fd3e244
Radio support, patch by Vladimir Voroshilov (voroshil gmail com)
reimar
parents:
18237
diff
changeset
|
119 #define MSGT_RADIO 42 |
bd821fd3e244
Radio support, patch by Vladimir Voroshilov (voroshil gmail com)
reimar
parents:
18237
diff
changeset
|
120 |
20629
e8885ec63928
Introduce MSGT_ASS, use it for all libass messages.
eugeni
parents:
19568
diff
changeset
|
121 #define MSGT_ASS 43 // libass messages |
e8885ec63928
Introduce MSGT_ASS, use it for all libass messages.
eugeni
parents:
19568
diff
changeset
|
122 |
21290
efc774a1e5a4
fix compilation for win32 dll codec support for intel osx
nplourde
parents:
20629
diff
changeset
|
123 #define MSGT_LOADER 44 // dll loader messages |
efc774a1e5a4
fix compilation for win32 dll codec support for intel osx
nplourde
parents:
20629
diff
changeset
|
124 |
23460 | 125 #define MSGT_STATUSLINE 45 // playback/encoding status line |
126 | |
29760
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
26103
diff
changeset
|
127 #define MSGT_TELETEXT 46 // Teletext decoder |
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
26103
diff
changeset
|
128 |
1562 | 129 #define MSGT_MAX 64 |
130 | |
31392
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
131 |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
132 extern char *mp_msg_charset; |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
133 extern int mp_msg_color; |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
134 extern int mp_msg_module; |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
135 |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
136 extern int mp_msg_levels[MSGT_MAX]; |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
137 extern int mp_msg_level_all; |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
138 |
aba3834b6411
Move mp_msg-related extern variable declarations to mp_msg.h.
diego
parents:
30429
diff
changeset
|
139 |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
17106
diff
changeset
|
140 void mp_msg_init(void); |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
6296
diff
changeset
|
141 int mp_msg_test(int mod, int lev); |
1562 | 142 |
5101 | 143 #include "config.h" |
144 | |
32378
150df72e808f
Add a va_list version of mp_msg and use it to avoid yet another intermediate
reimar
parents:
31392
diff
changeset
|
145 void mp_msg_va(int mod, int lev, const char *format, va_list va); |
1568
2d4904c16667
modifications to use variable number of arguments in #define with GCC
atlka
parents:
1566
diff
changeset
|
146 #ifdef __GNUC__ |
16618 | 147 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4))); |
16621 | 148 # ifdef MP_DEBUG |
149 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args ) | |
150 # else | |
33356
bf994e94e70a
Change mp_dbg so that syntax is checked also when it is disabled.
reimar
parents:
32702
diff
changeset
|
151 // only useful for developers, disable but check syntax |
bf994e94e70a
Change mp_dbg so that syntax is checked also when it is disabled.
reimar
parents:
32702
diff
changeset
|
152 # define mp_dbg(mod,lev, args... ) do { if (0) mp_msg(mod, lev, ## args ); } while (0) |
16621 | 153 # endif |
16618 | 154 #else // not GNU C |
155 void mp_msg(int mod, int lev, const char *format, ... ); | |
16621 | 156 # ifdef MP_DEBUG |
157 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__) | |
158 # else | |
33356
bf994e94e70a
Change mp_dbg so that syntax is checked also when it is disabled.
reimar
parents:
32702
diff
changeset
|
159 // only useful for developers, disable but check syntax |
bf994e94e70a
Change mp_dbg so that syntax is checked also when it is disabled.
reimar
parents:
32702
diff
changeset
|
160 # define mp_dbg(mod,lev, ... ) do { if (0) mp_msg(mod, lev, __VA_ARGS__); } while (0) |
16621 | 161 # endif |
25534 | 162 #endif /* __GNUC__ */ |
1566 | 163 |
22002
ebd2d5efb11b
filename double-conversion, especially usefull for CJK users :-)
gpoirier
parents:
21290
diff
changeset
|
164 const char* filename_recode(const char* filename); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4044
diff
changeset
|
165 |
26029 | 166 #endif /* MPLAYER_MP_MSG_H */ |