]> git.sesse.net Git - vlc/blob - include/config.h
D�but du changement de chaine.
[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
8 /* Conventions regarding names of symbols and variables
9  * ----------------------------------------------------
10  *
11  * - Symbols should begin with a prefix indicating in which module they are
12  *   used, such as INTF_, VOUT_ or ADEC_.
13  *
14  * - Regarding environment variables, which are used as initialization parameters 
15  *   for threads :
16  *   + variable names should end with '_VAR'
17  *   + environment variable default value should end with '_DEFAULT'
18  *   + values having a special meaning with '_VAL' 
19  *   
20  */
21
22 /*******************************************************************************
23  * Program information
24  *******************************************************************************/
25
26 /* Program options - this part will produce a copyright message with compilation
27  * options informations, based on some definines set in the Makefile - do not
28  * edit */
29 #if defined(VIDEO_X11)
30 #define VIDEO_OPTIONS                   "X11"
31 #elif defined(VIDEO_FB)
32 #define VIDEO_OPTIONS                   "Framebuffer"
33 #elif defined(VIDEO_GGI)
34 #define VIDEO_OPTIONS                   "GGI"
35 #else
36 #define VIDEO_OPTIONS                   ""
37 #endif
38 #if defined(HAVE_MMX)
39 #define ARCH_OPTIONS                    "MMX"
40 #else
41 #define ARCH_OPTIONS                    ""
42 #endif
43 #define PROGRAM_OPTIONS                 VIDEO_OPTIONS " " ARCH_OPTIONS
44
45 /* Program version and copyright message */
46 #define PROGRAM_VERSION                 "1.0-dev"
47 #define COPYRIGHT_MESSAGE               "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - " \
48                                         PROGRAM_OPTIONS " - (c)1999-2000 VideoLAN"
49
50 /*******************************************************************************
51  * General compilation options
52  *******************************************************************************/
53
54 /* Define for DVB support - Note that some extensions or restrictions may be
55  * incompatible with native MPEG2 streams */
56 //#define DVB_EXTENSIONS
57 //#define DVB_RESTRICTIONS
58
59 /* Define to disable some obscure heuristics behind the video_parser and the
60  * video_decoder that improve performance but are not fully MPEG2 compliant
61  * and might cause problems with some very weird streams. */
62 //#define MPEG2_COMPLIANT
63
64 /* Define for profiling and statistics support - such informations, like FPS
65  * or pictures count won't be available if it not set */
66 #define STATS
67
68 /* Define for unthreaded version of the program - ?? not yet implemented */
69 //#define NO_THREAD
70
71 /*******************************************************************************
72  * Debugging options - define or undefine symbols
73  *******************************************************************************/
74
75 /* General debugging support */
76 #define DEBUG
77
78 /* Modules specific debugging - this will produce a lot of output, but can be
79  * usefull to track a bug */
80 #define DEBUG_INTF
81 #define DEBUG_INPUT
82 #define DEBUG_AUDIO
83 #define DEBUG_VIDEO
84
85 /* Debugging log file - if defined, a file can be used to store all messages. If
86  * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
87  * will not appear on the screen */
88 #define DEBUG_LOG                       "vlc-debug.log"
89 #define DEBUG_LOG_ONLY
90
91 /*******************************************************************************
92  * General configuration
93  *******************************************************************************/
94
95 /* Automagically spawn input, audio and video threads ? */
96 // ?? used ?
97 #define AUTO_SPAWN
98
99 /* When creating or destroying threads in blocking mode, delay to poll thread
100  * status */
101 #define THREAD_SLEEP                    10000
102
103 /*
104  * Decoders FIFO configuration
105  */
106
107 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
108 #define FIFO_SIZE                       1023
109
110
111 /*******************************************************************************
112  * Interface configuration
113  *******************************************************************************/
114
115 /* Environment variable used to store startup script name and default value */
116 #define INTF_INIT_SCRIPT_VAR            "vlc_init"
117 #define INTF_INIT_SCRIPT_DEFAULT        "vlc.init"
118
119 /* Base delay in micro second for interface sleeps */
120 #define INTF_IDLE_SLEEP                 100000
121
122 /* Step for changing gamma, and minimum and maximum values */
123 #define INTF_GAMMA_STEP                 .1
124 #define INTF_GAMMA_LIMIT                3
125
126 /*
127  * X11 settings
128  */
129
130 /* Title of the X11 window */
131 #define VOUT_TITLE                      "VideoLAN Client"
132
133 /*******************************************************************************
134  * Input thread configuration
135  *******************************************************************************/
136
137 /* ?? */
138 #define INPUT_IDLE_SLEEP                100000
139
140 /*
141  * General limitations
142  */
143
144 /* Broadcast address, in case of a broadcasted stream */
145 #define INPUT_BCAST_ADDR                "138.195.143.255"
146
147 /* Maximum number of input threads - this value is used exclusively by
148  * interface, and is in fact an interface limitation */
149 #define INPUT_MAX_THREADS               10
150
151 /* Maximum number of programs definitions in a TS stream */
152 #define INPUT_MAX_PGRM                  10
153
154 /* Maximum number of ES definitions in a TS stream */
155 #define INPUT_MAX_ES                    10
156
157 /* Maximum number of ES in a single program */
158 #define INPUT_MAX_PROGRAM_ES            10
159
160 /* Maximum number of selected ES in an input thread */
161 #define INPUT_MAX_SELECTED_ES           10
162
163 /* Maximum number of TS packets in the client at any time
164  * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
165  * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
166  * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
167 #define INPUT_MAX_TS                    32767      /* INPUT_MAX_TS + 1 = 2^15 */
168
169 /* Same thing with PES packets */
170 #define INPUT_MAX_PES                   16383
171
172 /* Maximum number of TS packets we read from the socket in one readv().
173  * Since you can't put more than 7 TS packets in an Ethernet frame,
174  * the maximum value is 7. This number should also limit the stream server,
175  * otherwise any supplementary packet is lost. */
176 #define INPUT_TS_READ_ONCE              7
177
178 /* Use a LIFO or FIFO for TS netlist ? */
179 #undef INPUT_LIFO_TS_NETLIST
180
181 /* Use a LIFO or FIFO for PES netlist ? */
182 #undef INPUT_LIFO_PES_NETLIST
183
184 /* Maximum length of a hostname */
185 #define INPUT_MAX_HOSTNAME_LENGTH       100
186
187
188 /* Default input method */
189 #define INPUT_DEFAULT_METHOD            INPUT_METHOD_TS_UCAST
190
191 /* Default remote server */
192 #define VIDEOLAN_DEFAULT_SERVER         "vod.via.ecp.fr"
193
194 /* Default videolan port */
195 #define VIDEOLAN_DEFAULT_PORT           1234
196
197 /* Default videolan VLAN */
198 #define VIDEOLAN_DEFAULT_VLAN           3
199
200 /*
201  * Vlan method 
202  */ 
203
204 /* Default VLAN server */
205 #define VLAN_DEFAULT_SERVER             "vlanserver.via.ecp.fr"
206 #define VLAN_DEFAULT_SERVER_PORT        6010
207
208 /*******************************************************************************
209  * Audio configuration
210  *******************************************************************************/
211
212 /* Environment variable used to store dsp device name, and default value */
213 #define AOUT_DSP_VAR                    "vlc_dsp"
214 #define AOUT_DSP_DEFAULT                "/dev/dsp"
215
216 /* Environment variable for stereo, and default value */
217 #define AOUT_STEREO_VAR                 "vlc_stereo"
218 #define AOUT_STEREO_DEFAULT             1
219
220 /* Environment variable for output rate, and default value */
221 #define AOUT_RATE_VAR                   "vlc_audio_rate"
222 #define AOUT_RATE_DEFAULT               44100 
223
224 /*******************************************************************************
225  * Video configuration
226  *******************************************************************************/
227
228 /*
229  * Default settings for video output threads
230  */
231
232 /* Environment variable used in place of DISPLAY if available */
233 #define VOUT_DISPLAY_VAR                "vlc_DISPLAY"
234
235 /* Default dimensions for display window - these dimensions are enough for the 
236  * standard width and height broadcasted MPEG-2 streams */
237 #define VOUT_WIDTH_VAR                  "vlc_width"
238 #define VOUT_HEIGHT_VAR                 "vlc_height"
239 #define VOUT_WIDTH_DEFAULT              640
240 #define VOUT_HEIGHT_DEFAULT             480
241
242 /* Default video heap size - remember that a decompressed picture is big 
243  * (~1 Mbyte) before using huge values */
244 #define VOUT_MAX_PICTURES               10
245
246 /* Environment variable for grayscale output mode, and default value */
247 #define VOUT_GRAYSCALE_VAR              "vlc_grayscale"
248 #define VOUT_GRAYSCALE_DEFAULT          0
249
250 /* Default gamma */
251 #define VOUT_GAMMA                      0.
252
253 /*
254  * Time settings
255  */
256
257 /* Time during which the thread will sleep if it has nothing to 
258  * display (in micro-seconds) */
259 /* ?? this constant will probably evolve to a calculated value */
260 #define VOUT_IDLE_SLEEP                 20000
261
262 /* Maximum lap of time allowed between the beginning of rendering and
263  * display. If, compared to the current date, the next image is too
264  * late, the thread will perform an idle loop. This time should be
265  * at least VOUT_IDLE_SLEEP plus the time required to render a few
266  * images, to avoid trashing of decoded images */
267 /* ?? this constant will probably evolve to a calculated value */
268 #define VOUT_DISPLAY_DELAY              100000
269
270 /* Delay (in microseconds) between increments in idle levels */
271 #define VOUT_IDLE_DELAY                 5000000
272
273 /* Number of pictures required to computes the FPS rate */
274 #define VOUT_FPS_SAMPLES                20
275
276 /*
277  * Framebuffer settings
278  */
279
280 /* Environment variable for framebuffer device, and default value */
281 #define VOUT_FB_DEV_VAR                 "vlc_fb_dev"
282 #define VOUT_FB_DEV_DEFAULT             "/dev/fb0"
283
284 /*
285  * X11 settings 
286  */
287
288 /* Font maximum and minimum characters - characters outside this range are not
289  * printed - maximum range is 1-256 */
290 #define VOUT_MIN_CHAR                   1
291 #define VOUT_MAX_CHAR                   128
292
293 /*******************************************************************************
294  * Video parser configuration
295  *******************************************************************************/
296
297 #define VPAR_IDLE_SLEEP                 100000
298
299 /* Number of macroblock buffers available. It should be always greater than
300  * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
301  * be a power of two. */
302 #define VFIFO_SIZE                      8191
303
304 /* Maximum number of macroblocks in a picture. */
305 #define MAX_MB                          2048
306
307 /*******************************************************************************
308  * Video decoder configuration
309  *******************************************************************************/
310
311 #define VDEC_IDLE_SLEEP                 100000
312
313 /* Number of video_decoder threads to launch on startup of the video_parser.
314  * It should always be less than half the number of macroblocks of a
315  * picture. */
316 #define NB_VDEC                         1
317
318 /* Maximum range of values out of the IDCT + motion compensation. Only
319  * used if you define MPEG2_COMPLIANT above. */
320 #define VDEC_CROPRANGE                  2048
321
322 /*******************************************************************************
323  * Generic decoder configuration
324  *******************************************************************************/
325
326 #define GDEC_IDLE_SLEEP                 100000
327
328 /*******************************************************************************
329  * Messages and console interfaces configuration
330  *******************************************************************************/
331
332 /* Maximal size of the message queue - in case of overflow, all messages in the
333  * queue are printed by the calling thread */
334 #define INTF_MSG_QSIZE                  64
335
336 /* Define to enable messages queues - disabling messages queue can be usefull
337  * when debugging, since it allows messages which would not otherwise be printed,
338  * due to a crash, to be printed anyway */
339 //#define INTF_MSG_QUEUE
340
341 /* Format of the header for debug messages. The arguments following this header
342  * are the file (char *), the function (char *) and the line (int) in which the
343  * message function was called */
344 #define INTF_MSG_DBG_FORMAT             "## %s:%s(),%i: "
345
346 /* Maximal number of arguments on a command line, including the function name */
347 #define INTF_MAX_ARGS                   20
348
349 /* Maximal size of a command line in a script */
350 #define INTF_MAX_CMD_SIZE               240
351
352 /* Number of memorized lines in console window text zone */
353 #define INTF_CONSOLE_MAX_TEXT           100
354
355 /* Maximal number of commands which can be saved in history list */
356 #define INTF_CONSOLE_MAX_HISTORY        20
357
358 /*******************************************************************************
359  * Network and VLAN management
360  *******************************************************************************/
361 /* Default network interface to use */
362 #define NET_DFLT_IF                     "eth0"
363
364 /* Default VLANserver address */
365 #define VLAN_DFLT_VLANSRV               "vlanserver"
366
367 /* Default VLANserver port */
368 #define VLAN_DFLT_VLANPORT              "6010"
369
370 /* Client identification */
371 #define VLAN_LOGIN                      "guest"
372 #define VLAN_PASSWD                     "none"