]> git.sesse.net Git - vlc/blob - include/config.h
Initial revision
[vlc] / include / config.h
1 /*******************************************************************************
2  * config.h: limits and configuration
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  * Defines all compilation-time configuration constants and size limits
6  *******************************************************************************
7  * required headers:
8  *  none
9  *******************************************************************************/
10
11 /*******************************************************************************
12  * Program information
13  *******************************************************************************/
14
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"
18
19 /*******************************************************************************
20  * General compilation options
21  *******************************************************************************/
22
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
27
28 /* Define for profiling support */
29 #define STATS
30
31 /* Define for unthreaded version of the program - ?? not yet implemented */
32 //#define NO_THREAD
33
34 /*******************************************************************************
35  * Debugging options - define or undefine symbols
36  *******************************************************************************/
37
38 /* General debugging support */
39 #define DEBUG
40
41 /* Modules specific debugging */
42 #define DEBUG_INTF
43 #define DEBUG_INPUT
44 #define DEBUG_AUDIO
45 #define DEBUG_VIDEO
46
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  
52
53 /* ?? VOUT_DEBUG and co have changed ! */
54
55 /*******************************************************************************
56  * Common settings
57  *******************************************************************************/
58
59 /* ?? */
60 #define THREAD_SLEEP    100000
61
62 /*
63  * X11/XLib settings
64  */
65
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
68  * a font */
69 #define X11_DEFAULT_FONT                "fixed"
70
71 /*
72  * Decoders FIFO configuration
73  */
74
75 /* Size of the FIFO. FIFO_SIZE+1 must be a multiple of 2 */
76 #define FIFO_SIZE                       511
77
78 /*******************************************************************************
79  * Input thread configuration
80  *******************************************************************************/
81
82 /* ?? */
83 #define INPUT_IDLE_SLEEP                100000
84
85 /*
86  * General limitations
87  */
88
89 /* Broadcast address, in case of a broadcasted stream */
90 #define INPUT_BCAST_ADDR                "138.195.143.255"
91
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
95
96 /* Maximum number of programs definitions in a TS stream */
97 #define INPUT_MAX_PGRM                  10
98
99 /* Maximum number of ES definitions in a TS stream */
100 #define INPUT_MAX_ES                    10
101
102 /* Maximum number of ES in a single program */
103 #define INPUT_MAX_PROGRAM_ES            10
104
105 /* Maximum number of selected ES in an input thread */
106 #define INPUT_MAX_SELECTED_ES           10
107
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 */
113
114 /* Same thing with PES packets */
115 #define INPUT_MAX_PES                   16383
116
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
122
123 /* Use a LIFO or FIFO for TS netlist ? */
124 #undef INPUT_LIFO_TS_NETLIST
125
126 /* Use a LIFO or FIFO for PES netlist ? */
127 #undef INPUT_LIFO_PES_NETLIST
128
129 /* Maximum length of a hostname */
130 #define INPUT_MAX_HOSTNAME_LENGTH       100
131
132
133 /* Default input method */
134 #define INPUT_DEFAULT_METHOD            20 /* unicast (debug) */
135
136 /* Default remote server */
137 #define VIDEOLAN_DEFAULT_SERVER         "vod.via.ecp.fr"
138
139 /* Default videolan port */
140 #define VIDEOLAN_DEFAULT_PORT           1234
141
142 /* Default videolan VLAN */
143 #define VIDEOLAN_DEFAULT_VLAN           3
144
145 /*
146  * Vlan method 
147  */ 
148
149 /* Default VLAN server */
150 #define VLAN_DEFAULT_SERVER             "vlanserver.via.ecp.fr"
151 #define VLAN_DEFAULT_SERVER_PORT        6010
152
153 /*******************************************************************************
154  * Audio output thread configuration
155  *******************************************************************************/
156
157 /*******************************************************************************
158  * Video output thread configuration
159  *******************************************************************************/
160
161 /*
162  * Default settings for video output threads
163  */
164
165 /* Title of the window */
166 #define VOUT_TITLE                      "VideoLAN Client: output"
167
168 /* Default use of XShm extension */
169 #define VOUT_SHM_EXT                    1
170
171 /* Dimensions for display window */
172 #define VOUT_WIDTH                      544
173 #define VOUT_HEIGHT                     576
174
175 /* Default heap size */
176 #define VOUT_HEAP_SIZE                  100
177
178 /*
179  * Limitations
180  */
181
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
185
186 /* Maximum number of video streams per video output thread */
187 #define VOUT_MAX_STREAMS                10
188
189 /* Maximum number of pictures which can be rendered in one loop, plus one */
190 #define VOUT_MAX_PICTURES               10
191
192 /*
193  * Other settings
194  */
195
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
200
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
208
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
215
216 /*******************************************************************************
217  * Video decoder configuration
218  *******************************************************************************/
219
220 #define VDEC_IDLE_SLEEP                 100000
221
222 /*******************************************************************************
223  * Generic decoder configuration
224  *******************************************************************************/
225
226 #define GDEC_IDLE_SLEEP                 100000
227
228 /*******************************************************************************
229  * Interface (main) thread configuration
230  *******************************************************************************/
231
232 /*
233  * Interface configuration
234  */
235
236 /* Base delay in micro second for interface sleeps ?? */
237 #define INTF_IDLE_SLEEP                 100000
238
239 /* Maximal number of arguments on a command line, including the function name */
240 #define INTF_MAX_ARGS                   20
241
242 /* Maximal size of a command line in a script */
243 #define INTF_MAX_CMD_SIZE               240
244
245 /*
246  * Messages functions
247  */
248
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
252
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*/
257
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: "
262
263 /* Filename to log message
264  * Note that messages are only logged when debugging */
265 #define INTF_MSG_LOGFILE "vlc.log"
266
267 /*
268  * X11 console properties
269  */
270
271 /* Title of the X11 console interface window */
272 #define INTF_XCONSOLE_TITLE             "VideoLAN Client: console"
273
274 /* Welcome message: this message is always displayed when a new console is
275  * openned */
276 #define INTF_XCONSOLE_WELCOME_MSG       COPYRIGHT_MESSAGE "try `help' to have a list of available commands"
277
278 /* Background pixmap - if not defined, no pixmap is used */
279 #define INTF_XCONSOLE_BACKGROUND_PIXMAP "Resources/background.xpm"
280
281 /* Default X11 console interface window geometry. It should at least give a
282  * default size */
283 #define INTF_XCONSOLE_GEOMETRY          "400x100"
284
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"
288
289 /* Number of memorized lines in X11 console window text zone */
290 #define INTF_XCONSOLE_MAX_LINES         100
291
292 /* Maximal number of commands which can be saved in history list */
293 #define INTF_XCONSOLE_HISTORY_SIZE      20
294
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
298
299
300 /*******************************************************************************
301  * Network and VLAN management
302  *******************************************************************************/
303 /* Default network interface to use */
304 #define NET_DFLT_IF                     "eth0"
305
306 /* Default VLANserver address */
307 #define VLAN_DFLT_VLANSRV               "vlanserver"
308
309 /* Default VLANserver port */
310 #define VLAN_DFLT_VLANPORT              "6010"
311
312 /* Client identification */
313 #define VLAN_LOGIN                      "guest"
314 #define VLAN_PASSWD                     "none"