]> git.sesse.net Git - vlc/blob - include/config.h
Et le petit toast qui va avec...
[vlc] / include / config.h
1 /*******************************************************************************
2  * config.h: limits and configuration
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  * Defines all compilation-time configuration constants and size limits
6  *******************************************************************************
7  * required headers:
8  *  none
9  *******************************************************************************/
10
11 /*******************************************************************************
12  * Program information
13  *******************************************************************************/
14
15 /* Program version and copyright message */
16 #define PROGRAM_VERSION         "0.0.x"
17 #define COPYRIGHT_MESSAGE       "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - (c)1999 VideoLAN\n"
18
19 /*******************************************************************************
20  * General compilation options
21  *******************************************************************************/
22
23 #define FRAMEBUFFER
24
25 /* Define for DVB support - Note that some extensions or restrictions may be
26  * incompatible with native MPEG2 streams */
27 //#define DVB_EXTENSIONS
28 //#define DVB_RESTRICTIONS
29
30 /* Define to disable some obscure heuristics behind the video_parser and the
31  * video_decoder that improve performance but are not fully MPEG2 compliant
32  * and might cause problems with some very weird streams. */
33 //#define MPEG2_COMPLIANT
34
35 /* Define for profiling support */
36 //#define STATS
37
38 /* Define for unthreaded version of the program - ?? not yet implemented */
39 //#define NO_THREAD
40
41 /*******************************************************************************
42  * Debugging options - define or undefine symbols
43  *******************************************************************************/
44
45 /* General debugging support */
46 #define DEBUG
47
48 /* Modules specific debugging */
49 #define DEBUG_INTF
50 #define DEBUG_INPUT
51 #define DEBUG_AUDIO
52 #define DEBUG_VIDEO
53
54 /* Debugging log file - if defined, a file can be used to store all messages. If
55  * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
56  * will not appear on the screen */
57 //#define DEBUG_LOG       "vlc-debug.log"
58 //#define DEBUG_LOG_ONLY  
59
60 /* ?? VOUT_DEBUG and co have changed ! */
61
62 /*******************************************************************************
63  * Common settings
64  *******************************************************************************/
65
66 /* Automagically spawn input, audio and video threads ? */
67 #define AUTO_SPAWN
68
69 /* Startup script */
70 #define INIT_SCRIPT     "vlc.init"
71
72 /* ?? */
73 #define THREAD_SLEEP    100000
74
75 /*
76  * X11/XLib settings
77  */
78
79 /* Default font used when a wished font could not be loaded - note that this
80  * font should be universal, else the program will exit when it can't find
81  * a font */
82 #define X11_DEFAULT_FONT                "fixed"
83
84 /*
85  * Decoders FIFO configuration
86  */
87
88 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
89 #define FIFO_SIZE                       1023
90
91 /*******************************************************************************
92  * Input thread configuration
93  *******************************************************************************/
94
95 /* ?? */
96 #define INPUT_IDLE_SLEEP                100000
97
98 /*
99  * General limitations
100  */
101
102 /* Broadcast address, in case of a broadcasted stream */
103 #define INPUT_BCAST_ADDR                "138.195.143.255"
104
105 /* Maximum number of input threads - this value is used exclusively by
106  * interface, and is in fact an interface limitation */
107 #define INPUT_MAX_THREADS               10
108
109 /* Maximum number of programs definitions in a TS stream */
110 #define INPUT_MAX_PGRM                  10
111
112 /* Maximum number of ES definitions in a TS stream */
113 #define INPUT_MAX_ES                    10
114
115 /* Maximum number of ES in a single program */
116 #define INPUT_MAX_PROGRAM_ES            10
117
118 /* Maximum number of selected ES in an input thread */
119 #define INPUT_MAX_SELECTED_ES           10
120
121 /* Maximum number of TS packets in the client at any time
122  * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
123  * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
124  * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
125 #define INPUT_MAX_TS                    32767      /* INPUT_MAX_TS + 1 = 2^15 */
126
127 /* Same thing with PES packets */
128 #define INPUT_MAX_PES                   16383
129
130 /* Maximum number of TS packets we read from the socket in one readv().
131  * Since you can't put more than 7 TS packets in an Ethernet frame,
132  * the maximum value is 7. This number should also limit the stream server,
133  * otherwise any supplementary packet is lost. */
134 #define INPUT_TS_READ_ONCE              7
135
136 /* Use a LIFO or FIFO for TS netlist ? */
137 #undef INPUT_LIFO_TS_NETLIST
138
139 /* Use a LIFO or FIFO for PES netlist ? */
140 #undef INPUT_LIFO_PES_NETLIST
141
142 /* Maximum length of a hostname */
143 #define INPUT_MAX_HOSTNAME_LENGTH       100
144
145
146 /* Default input method */
147 #define INPUT_DEFAULT_METHOD            INPUT_METHOD_TS_UCAST
148
149 /* Default remote server */
150 #define VIDEOLAN_DEFAULT_SERVER         "vod.via.ecp.fr"
151
152 /* Default videolan port */
153 #define VIDEOLAN_DEFAULT_PORT           1234
154
155 /* Default videolan VLAN */
156 #define VIDEOLAN_DEFAULT_VLAN           3
157
158 /*
159  * Vlan method 
160  */ 
161
162 /* Default VLAN server */
163 #define VLAN_DEFAULT_SERVER             "vlanserver.via.ecp.fr"
164 #define VLAN_DEFAULT_SERVER_PORT        6010
165
166 /*******************************************************************************
167  * Audio output thread configuration
168  *******************************************************************************/
169
170 /*******************************************************************************
171  * Video output thread configuration
172  *******************************************************************************/
173
174 /*
175  * Default settings for video output threads
176  */
177
178 /* Title of the window */
179 #define VOUT_TITLE                      "VideoLAN Client: output"
180
181 /* Default use of XShm extension */
182 #define VOUT_SHM_EXT                    1
183
184 /* Dimensions for display window */
185 #define VOUT_WIDTH                      544
186 #define VOUT_HEIGHT                     576
187
188 /* Default heap size */
189 #define VOUT_HEAP_SIZE                  100
190
191 /*
192  * Limitations
193  */
194
195 /* Maximum number of video output threads - this value is used exclusively by
196  * interface, and is in fact an interface limitation */
197 #define VOUT_MAX_THREADS                10
198
199 /* Maximum number of video streams per video output thread */
200 #define VOUT_MAX_STREAMS                10
201
202 /* Maximum number of pictures which can be rendered in one loop, plus one */
203 #define VOUT_MAX_PICTURES               10
204
205 /*
206  * Other settings
207  */
208
209 /* Time during which the thread will sleep if it has nothing to 
210  * display (in micro-seconds) */
211 /* ?? this constant will probably evolve to a calculated value */
212 #define VOUT_IDLE_SLEEP                 50000
213
214 /* Maximum lap of time allowed between the beginning of rendering and
215  * display. If, compared to the current date, the next image is too
216  * late, the thread will perform an idle loop. This time should be
217  * at least VOUT_IDLE_SLEEP plus the time required to render a few
218  * images, to avoid trashing of decoded images */
219 /* ?? this constant will probably evolve to a calculated value */
220 #define VOUT_DISPLAY_DELAY              150000
221
222 /* Maximum lap of time during which images are rendered in the same 
223  * time. It should be greater than the maximum time between two succesive
224  * images to avoid useless renderings and calls to the display driver,
225  * but not to high to avoid desynchronization */
226 /* ?? this constant will probably evolve to a calculated value */
227 #define VOUT_DISPLAY_TOLERANCE          150000
228
229 /*******************************************************************************
230  * Video parser configuration
231  *******************************************************************************/
232
233 #define VPAR_IDLE_SLEEP                 100000
234
235 /* Number of macroblock buffers available. It should be always greater than
236  * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
237  * be a power of two. */
238 #define VFIFO_SIZE                      4095
239
240 /* Maximum number of macroblocks in a picture. */
241 #define MAX_MB                          2048
242
243 /*******************************************************************************
244  * Video decoder configuration
245  *******************************************************************************/
246
247 #define VDEC_IDLE_SLEEP                 100000
248
249 /* Number of video_decoder threads to launch on startup of the video_parser.
250  * It should always be less than half the number of macroblocks of a
251  * picture. */
252 #define NB_VDEC                         1
253
254 /* Maximum range of values out of the IDCT + motion compensation. Only
255  * used if you define MPEG2_COMPLIANT above. */
256 #define VDEC_CROPRANGE                  2048
257
258 /*******************************************************************************
259  * Generic decoder configuration
260  *******************************************************************************/
261
262 #define GDEC_IDLE_SLEEP                 100000
263
264 /*******************************************************************************
265  * Interface (main) thread configuration
266  *******************************************************************************/
267
268 /*
269  * Interface configuration
270  */
271
272 /* Base delay in micro second for interface sleeps ?? */
273 #define INTF_IDLE_SLEEP                 100000
274
275 /* Maximal number of arguments on a command line, including the function name */
276 #define INTF_MAX_ARGS                   20
277
278 /* Maximal size of a command line in a script */
279 #define INTF_MAX_CMD_SIZE               240
280
281 /*
282  * Messages functions
283  */
284
285 /* Maximal size of the message queue - in case of overflow, all messages in the
286  * queue are printed by the calling thread */
287 #define INTF_MSG_QSIZE                  32
288
289 /* Define to enable messages queues - disabling messages queue can be usefull
290  * when debugging, since it allows messages which would not otherwise be printed,
291  * due to a crash, to be printed anyway */
292 /*#define INTF_MSG_QUEUE*/
293
294 /* Format of the header for debug messages. The arguments following this header
295  * are the file (char *), the function (char *) and the line (int) in which the
296  * message function was called */
297 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
298
299 /* Filename to log message
300  * Note that messages are only logged when debugging */
301 //#define INTF_MSG_LOGFILE "vlc.log"
302
303 /*
304  * X11 console properties
305  */
306
307 /* Title of the X11 console interface window */
308 #define INTF_XCONSOLE_TITLE             "VideoLAN Client: console"
309
310 /* Welcome message: this message is always displayed when a new console is
311  * openned */
312 #define INTF_XCONSOLE_WELCOME_MSG       COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
313
314 /* Background pixmap - if not defined, no pixmap is used */
315 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
316
317 /* Default X11 console interface window geometry. It should at least give a
318  * default size */
319 #define INTF_XCONSOLE_GEOMETRY          "400x100"
320
321 /* Font used in console. If first font is not found, the fallback font is
322  * used. Therefore, the fallback font should be a universal one. */
323 #define INTF_XCONSOLE_FONT              "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
324
325 /* Number of memorized lines in X11 console window text zone */
326 #define INTF_XCONSOLE_MAX_LINES         100
327
328 /* Maximal number of commands which can be saved in history list */
329 #define INTF_XCONSOLE_HISTORY_SIZE      20
330
331 /* Maximum width of a line in an X11 console window. If a larger line is
332  * printed, it will be wrapped. */
333 #define INTF_XCONSOLE_MAX_LINE_WIDTH    120
334
335
336 /*******************************************************************************
337  * Network and VLAN management
338  *******************************************************************************/
339 /* Default network interface to use */
340 #define NET_DFLT_IF                     "eth0"
341
342 /* Default VLANserver address */
343 #define VLAN_DFLT_VLANSRV               "vlanserver"
344
345 /* Default VLANserver port */
346 #define VLAN_DFLT_VLANPORT              "6010"
347
348 /* Client identification */
349 #define VLAN_LOGIN                      "guest"
350 #define VLAN_PASSWD                     "none"