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
233 /* Environment variable for grayscale output mode, and default value */
234 #define VOUT_GRAYSCALE_VAR "vlc_grayscale"
235 #define VOUT_GRAYSCALE_DEFAULT 0
237 /* Number of pictures required to computes the FPS rate */
238 #define VOUT_FPS_SAMPLES 5
244 /* Time during which the thread will sleep if it has nothing to
245 * display (in micro-seconds) */
246 /* ?? this constant will probably evolve to a calculated value */
247 #define VOUT_IDLE_SLEEP 20000
249 /* Maximum lap of time allowed between the beginning of rendering and
250 * display. If, compared to the current date, the next image is too
251 * late, the thread will perform an idle loop. This time should be
252 * at least VOUT_IDLE_SLEEP plus the time required to render a few
253 * images, to avoid trashing of decoded images */
254 /* ?? this constant will probably evolve to a calculated value */
255 #define VOUT_DISPLAY_DELAY 100000
258 * Framebuffer settings
261 /* Environment variable for framebuffer device, and default value */
262 #define VOUT_FB_DEV_VAR "vlc_fb_dev"
263 #define VOUT_FB_DEV_DEFAULT "/dev/fb0"
269 /* Allow use of X11 XShm (shared memory) extension if possible */
272 /* Font maximum and minimum characters - characters outside this range are not
273 * printed - maximum range is 1-256 */
274 #define VOUT_MIN_CHAR 1
275 #define VOUT_MAX_CHAR 128
277 /*******************************************************************************
278 * Video parser configuration
279 *******************************************************************************/
281 #define VPAR_IDLE_SLEEP 100000
283 /* Number of macroblock buffers available. It should be always greater than
284 * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
285 * be a power of two. */
286 #define VFIFO_SIZE 4095
288 /* Maximum number of macroblocks in a picture. */
291 /*******************************************************************************
292 * Video decoder configuration
293 *******************************************************************************/
295 #define VDEC_IDLE_SLEEP 100000
297 /* Number of video_decoder threads to launch on startup of the video_parser.
298 * It should always be less than half the number of macroblocks of a
302 /* Maximum range of values out of the IDCT + motion compensation. Only
303 * used if you define MPEG2_COMPLIANT above. */
304 #define VDEC_CROPRANGE 2048
306 /*******************************************************************************
307 * Generic decoder configuration
308 *******************************************************************************/
310 #define GDEC_IDLE_SLEEP 100000
312 /*******************************************************************************
313 * Interface (main) thread configuration
314 *******************************************************************************/
317 * Interface configuration
320 /* Base delay in micro second for interface sleeps ?? */
321 #define INTF_IDLE_SLEEP 100000
323 /* Maximal number of arguments on a command line, including the function name */
324 #define INTF_MAX_ARGS 20
326 /* Maximal size of a command line in a script */
327 #define INTF_MAX_CMD_SIZE 240
329 * X11 interface properties
331 #define INTF_APP_CLASS "vlc"
332 #define INTF_APP_NAME "vlc"
335 * X11 console properties
338 /* Title of the X11 console interface window */
339 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
341 /* Welcome message: this message is always displayed when a new console is
343 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
345 /* Background pixmap - if not defined, no pixmap is used */
346 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
348 /* Default X11 console interface window geometry. It should at least give a
350 #define INTF_XCONSOLE_GEOMETRY "400x100"
352 /* Font used in console. If first font is not found, the fallback font is
353 * used. Therefore, the fallback font should be a universal one. */
354 #define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
356 /* Number of memorized lines in X11 console window text zone */
357 #define INTF_CONSOLE_MAX_TEXT 100
359 /* Maximal number of commands which can be saved in history list */
360 #define INTF_CONSOLE_MAX_HISTORY 20
362 /* Maximum width of a line in an X11 console window. If a larger line is
363 * printed, it will be wrapped. */
364 #define INTF_XCONSOLE_MAX_LINE_WIDTH 120
366 #define ENV_VLC_DISPLAY "vlc_DISPLAY"
368 #define INTF_MAIN_WIDTH 600
369 #define INTF_MAIN_HEIGHT 600
371 /*******************************************************************************
372 * Interface messages functions
373 *******************************************************************************/
375 /* Maximal size of the message queue - in case of overflow, all messages in the
376 * queue are printed by the calling thread */
377 #define INTF_MSG_QSIZE 64
379 /* Define to enable messages queues - disabling messages queue can be usefull
380 * when debugging, since it allows messages which would not otherwise be printed,
381 * due to a crash, to be printed anyway */
382 #define INTF_MSG_QUEUE
384 /* Format of the header for debug messages. The arguments following this header
385 * are the file (char *), the function (char *) and the line (int) in which the
386 * message function was called */
387 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
389 /*******************************************************************************
390 * Network and VLAN management
391 *******************************************************************************/
392 /* Default network interface to use */
393 #define NET_DFLT_IF "eth0"
395 /* Default VLANserver address */
396 #define VLAN_DFLT_VLANSRV "vlanserver"
398 /* Default VLANserver port */
399 #define VLAN_DFLT_VLANPORT "6010"
401 /* Client identification */
402 #define VLAN_LOGIN "guest"
403 #define VLAN_PASSWD "none"