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