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 *******************************************************************************/
25 /* Define for DVB support - Note that some extensions or restrictions may be
26 * incompatible with native MPEG2 streams */
27 //#define DVB_EXTENSIONS
28 //#define DVB_RESTRICTIONS
30 /* Define to disable some obscure heuristics behind the video_parser and the
31 * video_decoder that improve performance but are not fully MPEG2 compliant
32 * and might cause problems with some very weird streams. */
33 //#define MPEG2_COMPLIANT
35 /* Define for profiling support */
38 /* Define for unthreaded version of the program - ?? not yet implemented */
41 /*******************************************************************************
42 * Debugging options - define or undefine symbols
43 *******************************************************************************/
45 /* General debugging support */
48 /* Modules specific debugging */
54 /* Debugging log file - if defined, a file can be used to store all messages. If
55 * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
56 * will not appear on the screen */
57 //#define DEBUG_LOG "vlc-debug.log"
58 //#define DEBUG_LOG_ONLY
60 /* ?? VOUT_DEBUG and co have changed ! */
62 /*******************************************************************************
64 *******************************************************************************/
66 /* Automagically spawn input, audio and video threads ? */
70 #define INIT_SCRIPT "vlc.init"
73 #define THREAD_SLEEP 100000
79 /* Default font used when a wished font could not be loaded - note that this
80 * font should be universal, else the program will exit when it can't find
82 #define X11_DEFAULT_FONT "fixed"
85 * Decoders FIFO configuration
88 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
89 #define FIFO_SIZE 1023
91 /*******************************************************************************
92 * Input thread configuration
93 *******************************************************************************/
96 #define INPUT_IDLE_SLEEP 100000
102 /* Broadcast address, in case of a broadcasted stream */
103 #define INPUT_BCAST_ADDR "138.195.143.255"
105 /* Maximum number of input threads - this value is used exclusively by
106 * interface, and is in fact an interface limitation */
107 #define INPUT_MAX_THREADS 10
109 /* Maximum number of programs definitions in a TS stream */
110 #define INPUT_MAX_PGRM 10
112 /* Maximum number of ES definitions in a TS stream */
113 #define INPUT_MAX_ES 10
115 /* Maximum number of ES in a single program */
116 #define INPUT_MAX_PROGRAM_ES 10
118 /* Maximum number of selected ES in an input thread */
119 #define INPUT_MAX_SELECTED_ES 10
121 /* Maximum number of TS packets in the client at any time
122 * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
123 * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
124 * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
125 #define INPUT_MAX_TS 32767 /* INPUT_MAX_TS + 1 = 2^15 */
127 /* Same thing with PES packets */
128 #define INPUT_MAX_PES 16383
130 /* Maximum number of TS packets we read from the socket in one readv().
131 * Since you can't put more than 7 TS packets in an Ethernet frame,
132 * the maximum value is 7. This number should also limit the stream server,
133 * otherwise any supplementary packet is lost. */
134 #define INPUT_TS_READ_ONCE 7
136 /* Use a LIFO or FIFO for TS netlist ? */
137 #undef INPUT_LIFO_TS_NETLIST
139 /* Use a LIFO or FIFO for PES netlist ? */
140 #undef INPUT_LIFO_PES_NETLIST
142 /* Maximum length of a hostname */
143 #define INPUT_MAX_HOSTNAME_LENGTH 100
146 /* Default input method */
147 #define INPUT_DEFAULT_METHOD INPUT_METHOD_TS_UCAST
149 /* Default remote server */
150 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
152 /* Default videolan port */
153 #define VIDEOLAN_DEFAULT_PORT 1234
155 /* Default videolan VLAN */
156 #define VIDEOLAN_DEFAULT_VLAN 3
162 /* Default VLAN server */
163 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
164 #define VLAN_DEFAULT_SERVER_PORT 6010
166 /*******************************************************************************
167 * Audio output thread configuration
168 *******************************************************************************/
170 /*******************************************************************************
171 * Video output thread configuration
172 *******************************************************************************/
175 * Default settings for video output threads
178 /* Title of the window */
179 #define VOUT_TITLE "VideoLAN Client: output"
181 /* Default use of XShm extension */
182 #define VOUT_SHM_EXT 1
184 /* Dimensions for display window */
185 #define VOUT_WIDTH 544
186 #define VOUT_HEIGHT 576
188 /* Default heap size */
189 #define VOUT_HEAP_SIZE 100
195 /* Maximum number of video output threads - this value is used exclusively by
196 * interface, and is in fact an interface limitation */
197 #define VOUT_MAX_THREADS 10
199 /* Maximum number of video streams per video output thread */
200 #define VOUT_MAX_STREAMS 10
202 /* Maximum number of pictures which can be rendered in one loop, plus one */
203 #define VOUT_MAX_PICTURES 10
209 /* Time during which the thread will sleep if it has nothing to
210 * display (in micro-seconds) */
211 /* ?? this constant will probably evolve to a calculated value */
212 #define VOUT_IDLE_SLEEP 50000
214 /* Maximum lap of time allowed between the beginning of rendering and
215 * display. If, compared to the current date, the next image is too
216 * late, the thread will perform an idle loop. This time should be
217 * at least VOUT_IDLE_SLEEP plus the time required to render a few
218 * images, to avoid trashing of decoded images */
219 /* ?? this constant will probably evolve to a calculated value */
220 #define VOUT_DISPLAY_DELAY 150000
222 /* Maximum lap of time during which images are rendered in the same
223 * time. It should be greater than the maximum time between two succesive
224 * images to avoid useless renderings and calls to the display driver,
225 * but not to high to avoid desynchronization */
226 /* ?? this constant will probably evolve to a calculated value */
227 #define VOUT_DISPLAY_TOLERANCE 150000
229 /*******************************************************************************
230 * Video parser configuration
231 *******************************************************************************/
233 #define VPAR_IDLE_SLEEP 100000
235 /* Number of macroblock buffers available. It should be always greater than
236 * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
237 * be a power of two. */
238 #define VFIFO_SIZE 4095
240 /* Maximum number of macroblocks in a picture. */
243 /*******************************************************************************
244 * Video decoder configuration
245 *******************************************************************************/
247 #define VDEC_IDLE_SLEEP 100000
249 /* Number of video_decoder threads to launch on startup of the video_parser.
250 * It should always be less than half the number of macroblocks of a
254 /* Maximum range of values out of the IDCT + motion compensation. Only
255 * used if you define MPEG2_COMPLIANT above. */
256 #define VDEC_CROPRANGE 2048
258 /*******************************************************************************
259 * Generic decoder configuration
260 *******************************************************************************/
262 #define GDEC_IDLE_SLEEP 100000
264 /*******************************************************************************
265 * Interface (main) thread configuration
266 *******************************************************************************/
269 * Interface configuration
272 /* Base delay in micro second for interface sleeps ?? */
273 #define INTF_IDLE_SLEEP 100000
275 /* Maximal number of arguments on a command line, including the function name */
276 #define INTF_MAX_ARGS 20
278 /* Maximal size of a command line in a script */
279 #define INTF_MAX_CMD_SIZE 240
285 /* Maximal size of the message queue - in case of overflow, all messages in the
286 * queue are printed by the calling thread */
287 #define INTF_MSG_QSIZE 32
289 /* Define to enable messages queues - disabling messages queue can be usefull
290 * when debugging, since it allows messages which would not otherwise be printed,
291 * due to a crash, to be printed anyway */
292 /*#define INTF_MSG_QUEUE*/
294 /* Format of the header for debug messages. The arguments following this header
295 * are the file (char *), the function (char *) and the line (int) in which the
296 * message function was called */
297 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
299 /* Filename to log message
300 * Note that messages are only logged when debugging */
301 //#define INTF_MSG_LOGFILE "vlc.log"
304 * X11 console properties
307 /* Title of the X11 console interface window */
308 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
310 /* Welcome message: this message is always displayed when a new console is
312 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
314 /* Background pixmap - if not defined, no pixmap is used */
315 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
317 /* Default X11 console interface window geometry. It should at least give a
319 #define INTF_XCONSOLE_GEOMETRY "400x100"
321 /* Font used in console. If first font is not found, the fallback font is
322 * used. Therefore, the fallback font should be a universal one. */
323 #define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
325 /* Number of memorized lines in X11 console window text zone */
326 #define INTF_XCONSOLE_MAX_LINES 100
328 /* Maximal number of commands which can be saved in history list */
329 #define INTF_XCONSOLE_HISTORY_SIZE 20
331 /* Maximum width of a line in an X11 console window. If a larger line is
332 * printed, it will be wrapped. */
333 #define INTF_XCONSOLE_MAX_LINE_WIDTH 120
336 /*******************************************************************************
337 * Network and VLAN management
338 *******************************************************************************/
339 /* Default network interface to use */
340 #define NET_DFLT_IF "eth0"
342 /* Default VLANserver address */
343 #define VLAN_DFLT_VLANSRV "vlanserver"
345 /* Default VLANserver port */
346 #define VLAN_DFLT_VLANPORT "6010"
348 /* Client identification */
349 #define VLAN_LOGIN "guest"
350 #define VLAN_PASSWD "none"