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 *******************************************************************************/
60 #define THREAD_SLEEP 100000
66 /* Default font used when a wished font could not be loaded - note that this
67 * font should be universal, else the program will exit when it can't find
69 #define X11_DEFAULT_FONT "fixed"
72 * Decoders FIFO configuration
75 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
78 /*******************************************************************************
79 * Input thread configuration
80 *******************************************************************************/
83 #define INPUT_IDLE_SLEEP 100000
89 /* Broadcast address, in case of a broadcasted stream */
90 #define INPUT_BCAST_ADDR "138.195.143.255"
92 /* Maximum number of input threads - this value is used exclusively by
93 * interface, and is in fact an interface limitation */
94 #define INPUT_MAX_THREADS 10
96 /* Maximum number of programs definitions in a TS stream */
97 #define INPUT_MAX_PGRM 10
99 /* Maximum number of ES definitions in a TS stream */
100 #define INPUT_MAX_ES 10
102 /* Maximum number of ES in a single program */
103 #define INPUT_MAX_PROGRAM_ES 10
105 /* Maximum number of selected ES in an input thread */
106 #define INPUT_MAX_SELECTED_ES 10
108 /* Maximum number of TS packets in the client at any time
109 * INPUT_MAX_TS + 1 must be a power of 2, to optimize the %(INPUT_MAX_TS+1)
110 * operation with a &INPUT_MAX_TS in the case of a fifo netlist.
111 * It should be > number of fifos * FIFO_SIZE to avoid input deadlock. */
112 #define INPUT_MAX_TS 16383 /* INPUT_MAX_TS + 1 = 2^14 */
114 /* Same thing with PES packets */
115 #define INPUT_MAX_PES 16383
117 /* Maximum number of TS packets we read from the socket in one readv().
118 * Since you can't put more than 7 TS packets in an Ethernet frame,
119 * the maximum value is 7. This number should also limit the stream server,
120 * otherwise any supplementary packet is lost. */
121 #define INPUT_TS_READ_ONCE 7
123 /* Use a LIFO or FIFO for TS netlist ? */
124 #undef INPUT_LIFO_TS_NETLIST
126 /* Use a LIFO or FIFO for PES netlist ? */
127 #undef INPUT_LIFO_PES_NETLIST
129 /* Maximum length of a hostname */
130 #define INPUT_MAX_HOSTNAME_LENGTH 100
133 /* Default input method */
134 #define INPUT_DEFAULT_METHOD 20 /* unicast (debug) */
136 /* Default remote server */
137 #define VIDEOLAN_DEFAULT_SERVER "vod.via.ecp.fr"
139 /* Default videolan port */
140 #define VIDEOLAN_DEFAULT_PORT 1234
142 /* Default videolan VLAN */
143 #define VIDEOLAN_DEFAULT_VLAN 3
149 /* Default VLAN server */
150 #define VLAN_DEFAULT_SERVER "vlanserver.via.ecp.fr"
151 #define VLAN_DEFAULT_SERVER_PORT 6010
153 /*******************************************************************************
154 * Audio output thread configuration
155 *******************************************************************************/
157 /*******************************************************************************
158 * Video output thread configuration
159 *******************************************************************************/
162 * Default settings for video output threads
165 /* Title of the window */
166 #define VOUT_TITLE "VideoLAN Client: output"
168 /* Default use of XShm extension */
169 #define VOUT_SHM_EXT 1
171 /* Dimensions for display window */
172 #define VOUT_WIDTH 544
173 #define VOUT_HEIGHT 576
175 /* Default heap size */
176 #define VOUT_HEAP_SIZE 100
182 /* Maximum number of video output threads - this value is used exclusively by
183 * interface, and is in fact an interface limitation */
184 #define VOUT_MAX_THREADS 10
186 /* Maximum number of video streams per video output thread */
187 #define VOUT_MAX_STREAMS 10
189 /* Maximum number of pictures which can be rendered in one loop, plus one */
190 #define VOUT_MAX_PICTURES 10
196 /* Time during which the thread will sleep if it has nothing to
197 * display (in micro-seconds) */
198 /* ?? this constant will probably evolve to a calculated value */
199 #define VOUT_IDLE_SLEEP 50000
201 /* Maximum lap of time allowed between the beginning of rendering and
202 * display. If, compared to the current date, the next image is too
203 * late, the thread will perform an idle loop. This time should be
204 * at least VOUT_IDLE_SLEEP plus the time required to render a few
205 * images, to avoid trashing of decoded images */
206 /* ?? this constant will probably evolve to a calculated value */
207 #define VOUT_DISPLAY_DELAY 150000
209 /* Maximum lap of time during which images are rendered in the same
210 * time. It should be greater than the maximum time between two succesive
211 * images to avoid useless renderings and calls to the display driver,
212 * but not to high to avoid desynchronization */
213 /* ?? this constant will probably evolve to a calculated value */
214 #define VOUT_DISPLAY_TOLERANCE 150000
216 /*******************************************************************************
217 * Video decoder configuration
218 *******************************************************************************/
220 #define VDEC_IDLE_SLEEP 100000
222 /*******************************************************************************
223 * Generic decoder configuration
224 *******************************************************************************/
226 #define GDEC_IDLE_SLEEP 100000
228 /*******************************************************************************
229 * Interface (main) thread configuration
230 *******************************************************************************/
233 * Interface configuration
236 /* Base delay in micro second for interface sleeps ?? */
237 #define INTF_IDLE_SLEEP 100000
239 /* Maximal number of arguments on a command line, including the function name */
240 #define INTF_MAX_ARGS 20
242 /* Maximal size of a command line in a script */
243 #define INTF_MAX_CMD_SIZE 240
249 /* Maximal size of the message queue - in case of overflow, all messages in the
250 * queue are printed by the calling thread */
251 #define INTF_MSG_QSIZE 32
253 /* Define to enable messages queues - disabling messages queue can be usefull
254 * when debugging, since it allows messages which would not otherwise be printed,
255 * due to a crash, to be printed anyway */
256 /*#define INTF_MSG_QUEUE*/
258 /* Format of the header for debug messages. The arguments following this header
259 * are the file (char *), the function (char *) and the line (int) in which the
260 * message function was called */
261 #define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
263 /* Filename to log message
264 * Note that messages are only logged when debugging */
265 #define INTF_MSG_LOGFILE "vlc.log"
268 * X11 console properties
271 /* Title of the X11 console interface window */
272 #define INTF_XCONSOLE_TITLE "VideoLAN Client: console"
274 /* Welcome message: this message is always displayed when a new console is
276 #define INTF_XCONSOLE_WELCOME_MSG COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
278 /* Background pixmap - if not defined, no pixmap is used */
279 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
281 /* Default X11 console interface window geometry. It should at least give a
283 #define INTF_XCONSOLE_GEOMETRY "400x100"
285 /* Font used in console. If first font is not found, the fallback font is
286 * used. Therefore, the fallback font should be a universal one. */
287 #define INTF_XCONSOLE_FONT "-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-iso8859-1"
289 /* Number of memorized lines in X11 console window text zone */
290 #define INTF_XCONSOLE_MAX_LINES 100
292 /* Maximal number of commands which can be saved in history list */
293 #define INTF_XCONSOLE_HISTORY_SIZE 20
295 /* Maximum width of a line in an X11 console window. If a larger line is
296 * printed, it will be wrapped. */
297 #define INTF_XCONSOLE_MAX_LINE_WIDTH 120
300 /*******************************************************************************
301 * Network and VLAN management
302 *******************************************************************************/
303 /* Default network interface to use */
304 #define NET_DFLT_IF "eth0"
306 /* Default VLANserver address */
307 #define VLAN_DFLT_VLANSRV "vlanserver"
309 /* Default VLANserver port */
310 #define VLAN_DFLT_VLANPORT "6010"
312 /* Client identification */
313 #define VLAN_LOGIN "guest"
314 #define VLAN_PASSWD "none"