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 for profiling support */
31 /* Define for unthreaded version of the program - ?? not yet implemented */
34 /*******************************************************************************
35 * Debugging options - define or undefine symbols
36 *******************************************************************************/
38 /* General debugging support */
41 /* Modules specific debugging */
47 /* Debugging log file - if defined, a file can be used to store all messages. If
48 * DEBUG_LOG_ONLY is defined, debug messages will only be printed to the log and
49 * will not appear on the screen */
50 //#define DEBUG_LOG "vlc-debug.log"
51 //#define DEBUG_LOG_ONLY
53 /* ?? VOUT_DEBUG and co have changed ! */
55 /*******************************************************************************
57 *******************************************************************************/
59 /* Automagically spawn input, audio and video threads ? */
63 #define INIT_SCRIPT "vlc.init"
66 #define THREAD_SLEEP 100000
72 /* Default font used when a wished font could not be loaded - note that this
73 * font should be universal, else the program will exit when it can't find
75 #define X11_DEFAULT_FONT "fixed"
78 * Decoders FIFO configuration
81 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
84 /*******************************************************************************
85 * Input thread configuration
86 *******************************************************************************/
89 #define INPUT_IDLE_SLEEP 100000
95 /* Broadcast address, in case of a broadcasted stream */
96 #define INPUT_BCAST_ADDR "138.195.143.255"
98 /* Maximum number of input threads - this value is used exclusively by
99 * interface, and is in fact an interface limitation */
100 #define INPUT_MAX_THREADS 10
102 /* Maximum number of programs definitions in a TS stream */
103 #define INPUT_MAX_PGRM 10
105 /* Maximum number of ES definitions in a TS stream */
106 #define INPUT_MAX_ES 10
108 /* Maximum number of ES in a single program */
109 #define INPUT_MAX_PROGRAM_ES 10
111 /* Maximum number of selected ES in an input thread */
112 #define INPUT_MAX_SELECTED_ES 10
114 /* Maximum number of TS packets in the client at any time
115 * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
116 * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
117 * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
118 #define INPUT_MAX_TS 16383 /* INPUT_MAX_TS + 1 = 2^14 */
120 /* Same thing with PES packets */
121 #define INPUT_MAX_PES 16383
123 /* Maximum number of TS packets we read from the socket in one readv().
124 * Since you can't put more than 7 TS packets in an Ethernet frame,
125 * the maximum value is 7. This number should also limit the stream server,
126 * otherwise any supplementary packet is lost. */
127 #define INPUT_TS_READ_ONCE 7
129 /* Use a LIFO or FIFO for TS netlist ? */
130 #undef INPUT_LIFO_TS_NETLIST
132 /* Use a LIFO or FIFO for PES netlist ? */
133 #undef INPUT_LIFO_PES_NETLIST
135 /* Maximum length of a hostname */
136 #define INPUT_MAX_HOSTNAME_LENGTH 100
139 /* Default input method */
140 #define INPUT_DEFAULT_METHOD 20 /* unicast (debug) */
142 /* Default remote server */
143 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
145 /* Default videolan port */
146 #define VIDEOLAN_DEFAULT_PORT 1234
148 /* Default videolan VLAN */
149 #define VIDEOLAN_DEFAULT_VLAN 3
155 /* Default VLAN server */
156 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
157 #define VLAN_DEFAULT_SERVER_PORT 6010
159 /*******************************************************************************
160 * Audio output thread configuration
161 *******************************************************************************/
163 /*******************************************************************************
164 * Video output thread configuration
165 *******************************************************************************/
168 * Default settings for video output threads
171 /* Title of the window */
172 #define VOUT_TITLE "VideoLAN Client: output"
174 /* Default use of XShm extension */
175 #define VOUT_SHM_EXT 1
177 /* Dimensions for display window */
178 #define VOUT_WIDTH 544
179 #define VOUT_HEIGHT 576
181 /* Default heap size */
182 #define VOUT_HEAP_SIZE 100
188 /* Maximum number of video output threads - this value is used exclusively by
189 * interface, and is in fact an interface limitation */
190 #define VOUT_MAX_THREADS 10
192 /* Maximum number of video streams per video output thread */
193 #define VOUT_MAX_STREAMS 10
195 /* Maximum number of pictures which can be rendered in one loop, plus one */
196 #define VOUT_MAX_PICTURES 10
202 /* Time during which the thread will sleep if it has nothing to
203 * display (in micro-seconds) */
204 /* ?? this constant will probably evolve to a calculated value */
205 #define VOUT_IDLE_SLEEP 50000
207 /* Maximum lap of time allowed between the beginning of rendering and
208 * display. If, compared to the current date, the next image is too
209 * late, the thread will perform an idle loop. This time should be
210 * at least VOUT_IDLE_SLEEP plus the time required to render a few
211 * images, to avoid trashing of decoded images */
212 /* ?? this constant will probably evolve to a calculated value */
213 #define VOUT_DISPLAY_DELAY 150000
215 /* Maximum lap of time during which images are rendered in the same
216 * time. It should be greater than the maximum time between two succesive
217 * images to avoid useless renderings and calls to the display driver,
218 * but not to high to avoid desynchronization */
219 /* ?? this constant will probably evolve to a calculated value */
220 #define VOUT_DISPLAY_TOLERANCE 150000
222 /*******************************************************************************
223 * Video decoder configuration
224 *******************************************************************************/
226 #define VDEC_IDLE_SLEEP 100000
228 /*******************************************************************************
229 * Generic decoder configuration
230 *******************************************************************************/
232 #define GDEC_IDLE_SLEEP 100000
234 /*******************************************************************************
235 * Interface (main) thread configuration
236 *******************************************************************************/
239 * Interface configuration
242 /* Base delay in micro second for interface sleeps ?? */
243 #define INTF_IDLE_SLEEP 100000
245 /* Maximal number of arguments on a command line, including the function name */
246 #define INTF_MAX_ARGS 20
248 /* Maximal size of a command line in a script */
249 #define INTF_MAX_CMD_SIZE 240
255 /* Maximal size of the message queue - in case of overflow, all messages in the
256 * queue are printed by the calling thread */
257 #define INTF_MSG_QSIZE 32
259 /* Define to enable messages queues - disabling messages queue can be usefull
260 * when debugging, since it allows messages which would not otherwise be printed,
261 * due to a crash, to be printed anyway */
262 /*#define INTF_MSG_QUEUE*/
264 /* Format of the header for debug messages. The arguments following this header
265 * are the file (char *), the function (char *) and the line (int) in which the
266 * message function was called */
267 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
269 /* Filename to log message
270 * Note that messages are only logged when debugging */
271 //#define INTF_MSG_LOGFILE "vlc.log"
274 * X11 console properties
277 /* Title of the X11 console interface window */
278 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
280 /* Welcome message: this message is always displayed when a new console is
282 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
284 /* Background pixmap - if not defined, no pixmap is used */
285 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
287 /* Default X11 console interface window geometry. It should at least give a
289 #define INTF_XCONSOLE_GEOMETRY "400x100"
291 /* Font used in console. If first font is not found, the fallback font is
292 * used. Therefore, the fallback font should be a universal one. */
293 #define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
295 /* Number of memorized lines in X11 console window text zone */
296 #define INTF_XCONSOLE_MAX_LINES 100
298 /* Maximal number of commands which can be saved in history list */
299 #define INTF_XCONSOLE_HISTORY_SIZE 20
301 /* Maximum width of a line in an X11 console window. If a larger line is
302 * printed, it will be wrapped. */
303 #define INTF_XCONSOLE_MAX_LINE_WIDTH 120
306 /*******************************************************************************
307 * Network and VLAN management
308 *******************************************************************************/
309 /* Default network interface to use */
310 #define NET_DFLT_IF "eth0"
312 /* Default VLANserver address */
313 #define VLAN_DFLT_VLANSRV "vlanserver"
315 /* Default VLANserver port */
316 #define VLAN_DFLT_VLANPORT "6010"
318 /* Client identification */
319 #define VLAN_LOGIN "guest"
320 #define VLAN_PASSWD "none"