]> git.sesse.net Git - vlc/blob - include/config.h
GGI fonctionnel. N'oubliez pas de d�finit GII_INPUT.
[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  *   + complete environment strings with '_ENV'
20  *   
21  */
22
23 /*******************************************************************************
24  * Program information
25  *******************************************************************************/
26
27 /* Program options */
28 #if defined(VIDEO_X11)
29 #define VIDEO_OPTIONS           "X11"
30 #elif defined(VIDEO_FB)
31 #define VIDEO_OPTIONS           "Framebuffer"
32 #elif defined(VIDEO_GGI)
33 #define VIDEO_OPTIONS           "GGI"
34 #else
35 #define VIDEO_OPTIONS           ""
36 #endif
37 #if defined(HAVE_MMX)
38 #define ARCH_OPTIONS            "MMX"
39 #else
40 #define ARCH_OPTIONS            ""
41 #endif
42 #define PROGRAM_OPTIONS         VIDEO_OPTIONS " " ARCH_OPTIONS
43
44 /* Program version and copyright message */
45 #define PROGRAM_VERSION         "DR 2.1"
46 #define COPYRIGHT_MESSAGE       "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - " PROGRAM_OPTIONS " - (c)1999 VideoLAN\n"
47
48 /*******************************************************************************
49  * General compilation options
50  *******************************************************************************/
51
52 /* Define for DVB support - Note that some extensions or restrictions may be
53  * incompatible with native MPEG2 streams */
54 //#define DVB_EXTENSIONS
55 //#define DVB_RESTRICTIONS
56
57 /* Define to disable some obscure heuristics behind the video_parser and the
58  * video_decoder that improve performance but are not fully MPEG2 compliant
59  * and might cause problems with some very weird streams. */
60 //#define MPEG2_COMPLIANT
61
62 /* Define for profiling support */
63 //#define STATS
64
65 /* Define for unthreaded version of the program - ?? not yet implemented */
66 //#define NO_THREAD
67
68 /*******************************************************************************
69  * Debugging options - define or undefine symbols
70  *******************************************************************************/
71
72 /* General debugging support */
73 #define DEBUG
74
75 /* Extended debugging support - in this mode, debugging messages will have their
76  * date and context printed */
77 #define DEBUG_CONTEXT
78
79 /* Modules specific debugging */
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 /*******************************************************************************
93  * Common settings
94  *******************************************************************************/
95
96 /* Automagically spawn input, audio and video threads ? */
97 #define AUTO_SPAWN
98
99 /* Startup script */
100 #define INTF_INIT_SCRIPT_VAR      "vlc_init"
101 #define INTF_INIT_SCRIPT_DEFAULT  "vlc.init"
102
103 /* ?? */
104 #define THREAD_SLEEP    100000
105
106 /*
107  * X11/XLib settings
108  */
109
110 /* Default font used when a wished font could not be loaded - note that this
111  * font should be universal, else the program will exit when it can't find
112  * a font */
113 #define X11_DEFAULT_FONT                "fixed"
114
115 /*
116  * Decoders FIFO configuration
117  */
118
119 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
120 #define FIFO_SIZE                       1023
121
122 /*******************************************************************************
123  * Input thread configuration
124  *******************************************************************************/
125
126 /* ?? */
127 #define INPUT_IDLE_SLEEP                100000
128
129 /*
130  * General limitations
131  */
132
133 /* Broadcast address, in case of a broadcasted stream */
134 #define INPUT_BCAST_ADDR                "138.195.143.255"
135
136 /* Maximum number of input threads - this value is used exclusively by
137  * interface, and is in fact an interface limitation */
138 #define INPUT_MAX_THREADS               10
139
140 /* Maximum number of programs definitions in a TS stream */
141 #define INPUT_MAX_PGRM                  10
142
143 /* Maximum number of ES definitions in a TS stream */
144 #define INPUT_MAX_ES                    10
145
146 /* Maximum number of ES in a single program */
147 #define INPUT_MAX_PROGRAM_ES            10
148
149 /* Maximum number of selected ES in an input thread */
150 #define INPUT_MAX_SELECTED_ES           10
151
152 /* Maximum number of TS packets in the client at any time
153  * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
154  * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
155  * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
156 #define INPUT_MAX_TS                    32767      /* INPUT_MAX_TS + 1 = 2^15 */
157
158 /* Same thing with PES packets */
159 #define INPUT_MAX_PES                   16383
160
161 /* Maximum number of TS packets we read from the socket in one readv().
162  * Since you can't put more than 7 TS packets in an Ethernet frame,
163  * the maximum value is 7. This number should also limit the stream server,
164  * otherwise any supplementary packet is lost. */
165 #define INPUT_TS_READ_ONCE              7
166
167 /* Use a LIFO or FIFO for TS netlist ? */
168 #undef INPUT_LIFO_TS_NETLIST
169
170 /* Use a LIFO or FIFO for PES netlist ? */
171 #undef INPUT_LIFO_PES_NETLIST
172
173 /* Maximum length of a hostname */
174 #define INPUT_MAX_HOSTNAME_LENGTH       100
175
176
177 /* Default input method */
178 #define INPUT_DEFAULT_METHOD            INPUT_METHOD_TS_UCAST
179
180 /* Default remote server */
181 #define VIDEOLAN_DEFAULT_SERVER         "vod.via.ecp.fr"
182
183 /* Default videolan port */
184 #define VIDEOLAN_DEFAULT_PORT           1234
185
186 /* Default videolan VLAN */
187 #define VIDEOLAN_DEFAULT_VLAN           3
188
189 /*
190  * Vlan method 
191  */ 
192
193 /* Default VLAN server */
194 #define VLAN_DEFAULT_SERVER             "vlanserver.via.ecp.fr"
195 #define VLAN_DEFAULT_SERVER_PORT        6010
196
197 /*******************************************************************************
198  * Audio configuration
199  *******************************************************************************/
200
201 /* Environment variable used to store dsp device name, and default value */
202 #define AOUT_DSP_VAR                    "vlc_dsp"
203 #define AOUT_DSP_DEFAULT                "/dev/dsp"
204
205 /* Environment variable for stereo, and default value */
206 #define AOUT_STEREO_VAR                 "vlc_stereo"
207 #define AOUT_STEREO_DEFAULT             1
208
209 /* Environment variable for output rate, and default value */
210 #define AOUT_RATE_VAR                   "vlc_audio_rate"
211 #define AOUT_RATE_DEFAULT               44100 
212
213 /*******************************************************************************
214  * Video configuration
215  *******************************************************************************/
216
217 /*
218  * Default settings for video output threads
219  */
220
221 /* Title of the window */
222 #define VOUT_TITLE                      "VideoLAN Client"
223
224 /* Default dimensions for display window - these dimensions are the standard 
225  * width and height for broadcasted MPEG-2 */
226 #define VOUT_WIDTH                      544
227 #define VOUT_HEIGHT                     576
228
229 /* Default video heap size - remember that a decompressed picture is big 
230  * (~1 Mbyte) before using huge values */
231 #define VOUT_MAX_PICTURES               10
232
233 /*
234  * Time settings
235  */
236
237 /* Time during which the thread will sleep if it has nothing to 
238  * display (in micro-seconds) */
239 /* ?? this constant will probably evolve to a calculated value */
240 #define VOUT_IDLE_SLEEP                 50000
241
242 /* Maximum lap of time allowed between the beginning of rendering and
243  * display. If, compared to the current date, the next image is too
244  * late, the thread will perform an idle loop. This time should be
245  * at least VOUT_IDLE_SLEEP plus the time required to render a few
246  * images, to avoid trashing of decoded images */
247 /* ?? this constant will probably evolve to a calculated value */
248 #define VOUT_DISPLAY_DELAY              150000
249
250 /*
251  * Framebuffer settings
252  */
253
254 /* Environment variable for framebuffer device, and default value */
255 #define VOUT_FB_DEV_VAR                 "vlc_fb_dev"
256 #define VOUT_FB_DEV_DEFAULT             "/dev/fb0"
257
258 /*
259  * X11 settings 
260  */
261
262 /* Allow use of X11 XShm (shared memory) extension if possible */
263 #define VOUT_XSHM                       1
264
265 /*******************************************************************************
266  * Video parser configuration
267  *******************************************************************************/
268
269 #define VPAR_IDLE_SLEEP                 100000
270
271 /* Number of macroblock buffers available. It should be always greater than
272  * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
273  * be a power of two. */
274 #define VFIFO_SIZE                      4095
275
276 /* Maximum number of macroblocks in a picture. */
277 #define MAX_MB                          2048
278
279 /*******************************************************************************
280  * Video decoder configuration
281  *******************************************************************************/
282
283 #define VDEC_IDLE_SLEEP                 100000
284
285 /* Number of video_decoder threads to launch on startup of the video_parser.
286  * It should always be less than half the number of macroblocks of a
287  * picture. */
288 #define NB_VDEC                         1
289
290 /* Maximum range of values out of the IDCT + motion compensation. Only
291  * used if you define MPEG2_COMPLIANT above. */
292 #define VDEC_CROPRANGE                  2048
293
294 /*******************************************************************************
295  * Generic decoder configuration
296  *******************************************************************************/
297
298 #define GDEC_IDLE_SLEEP                 100000
299
300 /*******************************************************************************
301  * Interface (main) thread configuration
302  *******************************************************************************/
303
304 /*
305  * Interface configuration
306  */
307
308 /* Base delay in micro second for interface sleeps ?? */
309 #define INTF_IDLE_SLEEP                 100000
310
311 /* Maximal number of arguments on a command line, including the function name */
312 #define INTF_MAX_ARGS                   20
313
314 /* Maximal size of a command line in a script */
315 #define INTF_MAX_CMD_SIZE               240
316 /*
317  * X11 interface properties
318  */
319 #define INTF_APP_CLASS                  "vlc"
320 #define INTF_APP_NAME                   "vlc"
321 //??#define 
322
323 /*
324  * X11 console properties
325  */
326
327 /* Title of the X11 console interface window */
328 #define INTF_XCONSOLE_TITLE             "VideoLAN Client: console"
329
330 /* Welcome message: this message is always displayed when a new console is
331  * openned */
332 #define INTF_XCONSOLE_WELCOME_MSG       COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
333
334 /* Background pixmap - if not defined, no pixmap is used */
335 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
336
337 /* Default X11 console interface window geometry. It should at least give a
338  * default size */
339 #define INTF_XCONSOLE_GEOMETRY          "400x100"
340
341 /* Font used in console. If first font is not found, the fallback font is
342  * used. Therefore, the fallback font should be a universal one. */
343 #define INTF_XCONSOLE_FONT              "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
344
345 /* Number of memorized lines in X11 console window text zone */
346 #define INTF_CONSOLE_MAX_TEXT         100
347
348 /* Maximal number of commands which can be saved in history list */
349 #define INTF_CONSOLE_MAX_HISTORY      20
350
351 /* Maximum width of a line in an X11 console window. If a larger line is
352  * printed, it will be wrapped. */
353 #define INTF_XCONSOLE_MAX_LINE_WIDTH    120
354
355 #define ENV_VLC_DISPLAY "vlc_DISPLAY"
356
357 #define INTF_MAIN_WIDTH  600
358 #define INTF_MAIN_HEIGHT 600
359
360 /*******************************************************************************
361  * Interface messages functions
362  *******************************************************************************/
363
364 /* Maximal size of the message queue - in case of overflow, all messages in the
365  * queue are printed by the calling thread */
366 #define INTF_MSG_QSIZE                  32
367
368 /* Define to enable messages queues - disabling messages queue can be usefull
369  * when debugging, since it allows messages which would not otherwise be printed,
370  * due to a crash, to be printed anyway */
371 //#define INTF_MSG_QUEUE
372
373 /* Format of the header for debug messages. The arguments following this header
374  * are the file (char *), the function (char *) and the line (int) in which the
375  * message function was called */
376 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
377
378 /*******************************************************************************
379  * Network and VLAN management
380  *******************************************************************************/
381 /* Default network interface to use */
382 #define NET_DFLT_IF                     "eth0"
383
384 /* Default VLANserver address */
385 #define VLAN_DFLT_VLANSRV               "vlanserver"
386
387 /* Default VLANserver port */
388 #define VLAN_DFLT_VLANPORT              "6010"
389
390 /* Client identification */
391 #define VLAN_LOGIN                      "guest"
392 #define VLAN_PASSWD                     "none"