1 /*******************************************************************************
2 * config.h: limits and configuration
4 *******************************************************************************
5 * Defines all compilation-time configuration constants and size limits
6 *******************************************************************************/
8 /* Conventions regarding names of symbols and variables
9 * ----------------------------------------------------
11 * - Symbols should begin with a prefix indicating in which module they are
12 * used, such as INTF_, VOUT_ or ADEC_.
14 * - Regarding environment variables, which are used as initialization parameters
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'
23 /*******************************************************************************
25 *******************************************************************************/
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"
35 #define VIDEO_OPTIONS ""
38 #define ARCH_OPTIONS "MMX"
40 #define ARCH_OPTIONS ""
42 #define PROGRAM_OPTIONS VIDEO_OPTIONS " " ARCH_OPTIONS
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"
48 /*******************************************************************************
49 * General compilation options
50 *******************************************************************************/
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
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
62 /* Define for profiling support */
65 /* Define for unthreaded version of the program - ?? not yet implemented */
68 /*******************************************************************************
69 * Debugging options - define or undefine symbols
70 *******************************************************************************/
72 /* General debugging support */
75 /* Extended debugging support - in this mode, debugging messages will have their
76 * date and context printed */
79 /* Modules specific debugging */
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
92 /*******************************************************************************
94 *******************************************************************************/
96 /* Automagically spawn input, audio and video threads ? */
100 #define INTF_INIT_SCRIPT_VAR "vlc_init"
101 #define INTF_INIT_SCRIPT_DEFAULT "vlc.init"
104 #define THREAD_SLEEP 100000
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
113 #define X11_DEFAULT_FONT "fixed"
116 * Decoders FIFO configuration
119 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
120 #define FIFO_SIZE 1023
122 /*******************************************************************************
123 * Input thread configuration
124 *******************************************************************************/
127 #define INPUT_IDLE_SLEEP 100000
130 * General limitations
133 /* Broadcast address, in case of a broadcasted stream */
134 #define INPUT_BCAST_ADDR "138.195.143.255"
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
140 /* Maximum number of programs definitions in a TS stream */
141 #define INPUT_MAX_PGRM 10
143 /* Maximum number of ES definitions in a TS stream */
144 #define INPUT_MAX_ES 10
146 /* Maximum number of ES in a single program */
147 #define INPUT_MAX_PROGRAM_ES 10
149 /* Maximum number of selected ES in an input thread */
150 #define INPUT_MAX_SELECTED_ES 10
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 */
158 /* Same thing with PES packets */
159 #define INPUT_MAX_PES 16383
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
167 /* Use a LIFO or FIFO for TS netlist ? */
168 #undef INPUT_LIFO_TS_NETLIST
170 /* Use a LIFO or FIFO for PES netlist ? */
171 #undef INPUT_LIFO_PES_NETLIST
173 /* Maximum length of a hostname */
174 #define INPUT_MAX_HOSTNAME_LENGTH 100
177 /* Default input method */
178 #define INPUT_DEFAULT_METHOD INPUT_METHOD_TS_UCAST
180 /* Default remote server */
181 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
183 /* Default videolan port */
184 #define VIDEOLAN_DEFAULT_PORT 1234
186 /* Default videolan VLAN */
187 #define VIDEOLAN_DEFAULT_VLAN 3
193 /* Default VLAN server */
194 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
195 #define VLAN_DEFAULT_SERVER_PORT 6010
197 /*******************************************************************************
198 * Audio configuration
199 *******************************************************************************/
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"
205 /* Environment variable for stereo, and default value */
206 #define AOUT_STEREO_VAR "vlc_stereo"
207 #define AOUT_STEREO_DEFAULT 1
209 /* Environment variable for output rate, and default value */
210 #define AOUT_RATE_VAR "vlc_audio_rate"
211 #define AOUT_RATE_DEFAULT 44100
213 /*******************************************************************************
214 * Video configuration
215 *******************************************************************************/
218 * Default settings for video output threads
221 /* Title of the window */
222 #define VOUT_TITLE "VideoLAN Client"
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
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
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
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
251 * Framebuffer settings
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"
262 /* Allow use of X11 XShm (shared memory) extension if possible */
265 /*******************************************************************************
266 * Video parser configuration
267 *******************************************************************************/
269 #define VPAR_IDLE_SLEEP 100000
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
276 /* Maximum number of macroblocks in a picture. */
279 /*******************************************************************************
280 * Video decoder configuration
281 *******************************************************************************/
283 #define VDEC_IDLE_SLEEP 100000
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
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
294 /*******************************************************************************
295 * Generic decoder configuration
296 *******************************************************************************/
298 #define GDEC_IDLE_SLEEP 100000
300 /*******************************************************************************
301 * Interface (main) thread configuration
302 *******************************************************************************/
305 * Interface configuration
308 /* Base delay in micro second for interface sleeps ?? */
309 #define INTF_IDLE_SLEEP 100000
311 /* Maximal number of arguments on a command line, including the function name */
312 #define INTF_MAX_ARGS 20
314 /* Maximal size of a command line in a script */
315 #define INTF_MAX_CMD_SIZE 240
317 * X11 interface properties
319 #define INTF_APP_CLASS "vlc"
320 #define INTF_APP_NAME "vlc"
324 * X11 console properties
327 /* Title of the X11 console interface window */
328 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
330 /* Welcome message: this message is always displayed when a new console is
332 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
334 /* Background pixmap - if not defined, no pixmap is used */
335 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
337 /* Default X11 console interface window geometry. It should at least give a
339 #define INTF_XCONSOLE_GEOMETRY "400x100"
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"
345 /* Number of memorized lines in X11 console window text zone */
346 #define INTF_CONSOLE_MAX_TEXT 100
348 /* Maximal number of commands which can be saved in history list */
349 #define INTF_CONSOLE_MAX_HISTORY 20
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
355 #define ENV_VLC_DISPLAY "vlc_DISPLAY"
357 #define INTF_MAIN_WIDTH 600
358 #define INTF_MAIN_HEIGHT 600
360 /*******************************************************************************
361 * Interface messages functions
362 *******************************************************************************/
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
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
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: "
378 /*******************************************************************************
379 * Network and VLAN management
380 *******************************************************************************/
381 /* Default network interface to use */
382 #define NET_DFLT_IF "eth0"
384 /* Default VLANserver address */
385 #define VLAN_DFLT_VLANSRV "vlanserver"
387 /* Default VLANserver port */
388 #define VLAN_DFLT_VLANPORT "6010"
390 /* Client identification */
391 #define VLAN_LOGIN "guest"
392 #define VLAN_PASSWD "none"