1 /*******************************************************************************
2 * config.h: limits and configuration
4 *******************************************************************************
5 * Defines all compilation-time configuration constants and size limits
6 *******************************************************************************
9 *******************************************************************************/
11 /*******************************************************************************
13 *******************************************************************************/
15 /* Program version and copyright message */
16 #define PROGRAM_VERSION "0.0.x"
17 #define COPYRIGHT_MESSAGE "VideoLAN Client v" PROGRAM_VERSION " (" __DATE__ ") - (c)1999 VideoLAN\n"
19 /*******************************************************************************
20 * General compilation options
21 *******************************************************************************/
23 /* Define for DVB support - Note that some extensions or restrictions may be
24 * incompatible with native MPEG2 streams */
25 //#define DVB_EXTENSIONS
26 //#define DVB_RESTRICTIONS
28 /* Define to disable some obscure heuristics behind the video_parser and the
29 * video_decoder that improve performance but are not fully MPEG2 compliant
30 * and might cause problems with some very weird streams. */
31 //#define MPEG2_COMPLIANT
33 /* Define for profiling support */
36 /* Define for unthreaded version of the program - ?? not yet implemented */
39 /*******************************************************************************
40 * Debugging options - define or undefine symbols
41 *******************************************************************************/
43 /* General debugging support */
46 /* Modules specific debugging */
52 /* Debugging log file - if defined, a file can be used to store all messages. If
53 * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
54 * will not appear on the screen */
55 //#define DEBUG_LOG "vlc-debug.log"
56 //#define DEBUG_LOG_ONLY
58 /* ?? VOUT_DEBUG and co have changed ! */
60 /*******************************************************************************
62 *******************************************************************************/
64 /* Automagically spawn input, audio and video threads ? */
68 #define INIT_SCRIPT "vlc.init"
71 #define THREAD_SLEEP 100000
77 /* Default font used when a wished font could not be loaded - note that this
78 * font should be universal, else the program will exit when it can't find
80 #define X11_DEFAULT_FONT "fixed"
83 * Decoders FIFO configuration
86 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
87 #define FIFO_SIZE 1023
89 /*******************************************************************************
90 * Input thread configuration
91 *******************************************************************************/
94 #define INPUT_IDLE_SLEEP 100000
100 /* Broadcast address, in case of a broadcasted stream */
101 #define INPUT_BCAST_ADDR "138.195.143.255"
103 /* Maximum number of input threads - this value is used exclusively by
104 * interface, and is in fact an interface limitation */
105 #define INPUT_MAX_THREADS 10
107 /* Maximum number of programs definitions in a TS stream */
108 #define INPUT_MAX_PGRM 10
110 /* Maximum number of ES definitions in a TS stream */
111 #define INPUT_MAX_ES 10
113 /* Maximum number of ES in a single program */
114 #define INPUT_MAX_PROGRAM_ES 10
116 /* Maximum number of selected ES in an input thread */
117 #define INPUT_MAX_SELECTED_ES 10
119 /* Maximum number of TS packets in the client at any time
120 * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
121 * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
122 * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
123 #define INPUT_MAX_TS 32767 /* INPUT_MAX_TS + 1 = 2^15 */
125 /* Same thing with PES packets */
126 #define INPUT_MAX_PES 16383
128 /* Maximum number of TS packets we read from the socket in one readv().
129 * Since you can't put more than 7 TS packets in an Ethernet frame,
130 * the maximum value is 7. This number should also limit the stream server,
131 * otherwise any supplementary packet is lost. */
132 #define INPUT_TS_READ_ONCE 7
134 /* Use a LIFO or FIFO for TS netlist ? */
135 #undef INPUT_LIFO_TS_NETLIST
137 /* Use a LIFO or FIFO for PES netlist ? */
138 #undef INPUT_LIFO_PES_NETLIST
140 /* Maximum length of a hostname */
141 #define INPUT_MAX_HOSTNAME_LENGTH 100
144 /* Default input method */
145 #define INPUT_DEFAULT_METHOD INPUT_METHOD_TS_UCAST
147 /* Default remote server */
148 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
150 /* Default videolan port */
151 #define VIDEOLAN_DEFAULT_PORT 1234
153 /* Default videolan VLAN */
154 #define VIDEOLAN_DEFAULT_VLAN 3
160 /* Default VLAN server */
161 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
162 #define VLAN_DEFAULT_SERVER_PORT 6010
164 /*******************************************************************************
165 * Audio output thread configuration
166 *******************************************************************************/
168 /*******************************************************************************
169 * Video output thread configuration
170 *******************************************************************************/
173 * Default settings for video output threads
176 /* Title of the window */
177 #define VOUT_TITLE "VideoLAN Client: output"
179 /* Default use of XShm extension */
180 #define VOUT_SHM_EXT 1
182 /* Dimensions for display window */
183 #define VOUT_WIDTH 544
184 #define VOUT_HEIGHT 576
186 /* Default heap size */
187 #define VOUT_HEAP_SIZE 100
193 /* Maximum number of video output threads - this value is used exclusively by
194 * interface, and is in fact an interface limitation */
195 #define VOUT_MAX_THREADS 10
197 /* Maximum number of video streams per video output thread */
198 #define VOUT_MAX_STREAMS 10
200 /* Maximum number of pictures which can be rendered in one loop, plus one */
201 #define VOUT_MAX_PICTURES 10
207 /* Time during which the thread will sleep if it has nothing to
208 * display (in micro-seconds) */
209 /* ?? this constant will probably evolve to a calculated value */
210 #define VOUT_IDLE_SLEEP 50000
212 /* Maximum lap of time allowed between the beginning of rendering and
213 * display. If, compared to the current date, the next image is too
214 * late, the thread will perform an idle loop. This time should be
215 * at least VOUT_IDLE_SLEEP plus the time required to render a few
216 * images, to avoid trashing of decoded images */
217 /* ?? this constant will probably evolve to a calculated value */
218 #define VOUT_DISPLAY_DELAY 150000
220 /* Maximum lap of time during which images are rendered in the same
221 * time. It should be greater than the maximum time between two succesive
222 * images to avoid useless renderings and calls to the display driver,
223 * but not to high to avoid desynchronization */
224 /* ?? this constant will probably evolve to a calculated value */
225 #define VOUT_DISPLAY_TOLERANCE 150000
227 /*******************************************************************************
228 * Video parser configuration
229 *******************************************************************************/
231 #define VPAR_IDLE_SLEEP 100000
233 /* Number of macroblock buffers available. It should be always greater than
234 * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
235 * be a power of two. */
236 #define VFIFO_SIZE 4095
238 /* Maximum number of macroblocks in a picture. */
241 /*******************************************************************************
242 * Video decoder configuration
243 *******************************************************************************/
245 #define VDEC_IDLE_SLEEP 100000
247 /* Number of video_decoder threads to launch on startup of the video_parser.
248 * It should always be less than half the number of macroblocks of a
252 /*******************************************************************************
253 * Generic decoder configuration
254 *******************************************************************************/
256 #define GDEC_IDLE_SLEEP 100000
258 /*******************************************************************************
259 * Interface (main) thread configuration
260 *******************************************************************************/
263 * Interface configuration
266 /* Base delay in micro second for interface sleeps ?? */
267 #define INTF_IDLE_SLEEP 100000
269 /* Maximal number of arguments on a command line, including the function name */
270 #define INTF_MAX_ARGS 20
272 /* Maximal size of a command line in a script */
273 #define INTF_MAX_CMD_SIZE 240
279 /* Maximal size of the message queue - in case of overflow, all messages in the
280 * queue are printed by the calling thread */
281 #define INTF_MSG_QSIZE 32
283 /* Define to enable messages queues - disabling messages queue can be usefull
284 * when debugging, since it allows messages which would not otherwise be printed,
285 * due to a crash, to be printed anyway */
286 /*#define INTF_MSG_QUEUE*/
288 /* Format of the header for debug messages. The arguments following this header
289 * are the file (char *), the function (char *) and the line (int) in which the
290 * message function was called */
291 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
293 /* Filename to log message
294 * Note that messages are only logged when debugging */
295 //#define INTF_MSG_LOGFILE "vlc.log"
298 * X11 console properties
301 /* Title of the X11 console interface window */
302 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
304 /* Welcome message: this message is always displayed when a new console is
306 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
308 /* Background pixmap - if not defined, no pixmap is used */
309 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
311 /* Default X11 console interface window geometry. It should at least give a
313 #define INTF_XCONSOLE_GEOMETRY "400x100"
315 /* Font used in console. If first font is not found, the fallback font is
316 * used. Therefore, the fallback font should be a universal one. */
317 #define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
319 /* Number of memorized lines in X11 console window text zone */
320 #define INTF_XCONSOLE_MAX_LINES 100
322 /* Maximal number of commands which can be saved in history list */
323 #define INTF_XCONSOLE_HISTORY_SIZE 20
325 /* Maximum width of a line in an X11 console window. If a larger line is
326 * printed, it will be wrapped. */
327 #define INTF_XCONSOLE_MAX_LINE_WIDTH 120
330 /*******************************************************************************
331 * Network and VLAN management
332 *******************************************************************************/
333 /* Default network interface to use */
334 #define NET_DFLT_IF "eth0"
336 /* Default VLANserver address */
337 #define VLAN_DFLT_VLANSRV "vlanserver"
339 /* Default VLANserver port */
340 #define VLAN_DFLT_VLANPORT "6010"
342 /* Client identification */
343 #define VLAN_LOGIN "guest"
344 #define VLAN_PASSWD "none"