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 *******************************************************************************/
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"
31 /*******************************************************************************
32 * General compilation options
33 *******************************************************************************/
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
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
47 /* Define for profiling support */
50 /* Define for unthreaded version of the program - ?? not yet implemented */
53 /*******************************************************************************
54 * Debugging options - define or undefine symbols
55 *******************************************************************************/
57 /* General debugging support */
60 /* Extended debugging support - in this mode, debugging messages will have their
61 * date and context printed */
64 /* Modules specific debugging */
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
77 /*******************************************************************************
79 *******************************************************************************/
81 /* Automagically spawn input, audio and video threads ? */
85 #define INTF_INIT_SCRIPT_VAR "vlc_init"
86 #define INTF_INIT_SCRIPT_DEFAULT "vlc.init"
89 #define THREAD_SLEEP 100000
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
98 #define X11_DEFAULT_FONT "fixed"
101 * Decoders FIFO configuration
104 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
105 #define FIFO_SIZE 1023
107 /*******************************************************************************
108 * Input thread configuration
109 *******************************************************************************/
112 #define INPUT_IDLE_SLEEP 100000
115 * General limitations
118 /* Broadcast address, in case of a broadcasted stream */
119 #define INPUT_BCAST_ADDR "138.195.143.255"
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
125 /* Maximum number of programs definitions in a TS stream */
126 #define INPUT_MAX_PGRM 10
128 /* Maximum number of ES definitions in a TS stream */
129 #define INPUT_MAX_ES 10
131 /* Maximum number of ES in a single program */
132 #define INPUT_MAX_PROGRAM_ES 10
134 /* Maximum number of selected ES in an input thread */
135 #define INPUT_MAX_SELECTED_ES 10
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 */
143 /* Same thing with PES packets */
144 #define INPUT_MAX_PES 16383
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
152 /* Use a LIFO or FIFO for TS netlist ? */
153 #undef INPUT_LIFO_TS_NETLIST
155 /* Use a LIFO or FIFO for PES netlist ? */
156 #undef INPUT_LIFO_PES_NETLIST
158 /* Maximum length of a hostname */
159 #define INPUT_MAX_HOSTNAME_LENGTH 100
162 /* Default input method */
163 #define INPUT_DEFAULT_METHOD INPUT_METHOD_TS_UCAST
165 /* Default remote server */
166 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
168 /* Default videolan port */
169 #define VIDEOLAN_DEFAULT_PORT 1234
171 /* Default videolan VLAN */
172 #define VIDEOLAN_DEFAULT_VLAN 3
178 /* Default VLAN server */
179 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
180 #define VLAN_DEFAULT_SERVER_PORT 6010
182 /*******************************************************************************
183 * Audio configuration
184 *******************************************************************************/
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"
190 /* Environment variable for stereo, and default value */
191 #define AOUT_STEREO_VAR "vlc_stereo"
192 #define AOUT_STEREO_DEFAULT 1
194 /* Environment variable for output rate, and default value */
195 #define AOUT_RATE_VAR "vlc_audio_rate"
196 #define AOUT_RATE_DEFAULT 44100
198 /*******************************************************************************
199 * Video configuration
200 *******************************************************************************/
203 * Default settings for video output threads
206 /* Title of the window */
207 #define VOUT_TITLE "VideoLAN Client"
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
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
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
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
236 * Environment settings
239 /* Allow use of X11 XShm (shared memory) extension if possible */
242 /*******************************************************************************
243 * Video parser configuration
244 *******************************************************************************/
246 #define VPAR_IDLE_SLEEP 100000
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
253 /* Maximum number of macroblocks in a picture. */
256 /*******************************************************************************
257 * Video decoder configuration
258 *******************************************************************************/
260 #define VDEC_IDLE_SLEEP 100000
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
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
271 /*******************************************************************************
272 * Generic decoder configuration
273 *******************************************************************************/
275 #define GDEC_IDLE_SLEEP 100000
277 /*******************************************************************************
278 * Interface (main) thread configuration
279 *******************************************************************************/
282 * Interface configuration
285 /* Base delay in micro second for interface sleeps ?? */
286 #define INTF_IDLE_SLEEP 100000
288 /* Maximal number of arguments on a command line, including the function name */
289 #define INTF_MAX_ARGS 20
291 /* Maximal size of a command line in a script */
292 #define INTF_MAX_CMD_SIZE 240
294 * X11 interface properties
296 #define INTF_APP_CLASS "vlc"
297 #define INTF_APP_NAME "vlc"
301 * X11 console properties
304 /* Title of the X11 console interface window */
305 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
307 /* Welcome message: this message is always displayed when a new console is
309 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
311 /* Background pixmap - if not defined, no pixmap is used */
312 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
314 /* Default X11 console interface window geometry. It should at least give a
316 #define INTF_XCONSOLE_GEOMETRY "400x100"
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"
322 /* Number of memorized lines in X11 console window text zone */
323 #define INTF_CONSOLE_MAX_TEXT 100
325 /* Maximal number of commands which can be saved in history list */
326 #define INTF_CONSOLE_MAX_HISTORY 20
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
332 #define ENV_VLC_DISPLAY "vlc_DISPLAY"
334 #define INTF_MAIN_WIDTH 600
335 #define INTF_MAIN_HEIGHT 600
337 /*******************************************************************************
338 * Interface messages functions
339 *******************************************************************************/
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
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
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: "
355 /*******************************************************************************
356 * Network and VLAN management
357 *******************************************************************************/
358 /* Default network interface to use */
359 #define NET_DFLT_IF "eth0"
361 /* Default VLANserver address */
362 #define VLAN_DFLT_VLANSRV "vlanserver"
364 /* Default VLANserver port */
365 #define VLAN_DFLT_VLANPORT "6010"
367 /* Client identification */
368 #define VLAN_LOGIN "guest"
369 #define VLAN_PASSWD "none"