]> git.sesse.net Git - vlc/blob - include/videolan/vlc.h
d92df71374192f11c618640628fd1870cd17aa58
[vlc] / include / videolan / vlc.h
1 /*****************************************************************************
2  * vlc.h: common definitions
3  * Collection of useful common types and macros definitions
4  *****************************************************************************
5  * Copyright (C) 1998, 1999, 2000 VideoLAN
6  * $Id: vlc.h,v 1.2 2002/01/02 14:37:42 sam Exp $
7  *
8  * Authors: Samuel Hocevar <sam@via.ecp.fr>
9  *          Vincent Seguin <seguin@via.ecp.fr>
10  *          Gildas Bazin <gbazin@netcourrier.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
25  *****************************************************************************/
26
27 /*****************************************************************************
28  * Required system headers
29  *****************************************************************************/
30 #include <string.h>                                            /* strerror() */
31
32 /*****************************************************************************
33  * Required vlc headers
34  *****************************************************************************/
35 #include "defs.h"
36 #include "config.h"
37 #include "int_types.h"
38
39 #if defined( PLUGIN ) || defined( BUILTIN )
40 #   include "modules_inner.h"
41 #endif
42
43 /*****************************************************************************
44  * Basic types definitions
45  *****************************************************************************/
46
47 typedef u8                  byte_t;
48
49 /* Boolean type */
50 #ifdef BOOLEAN_T_IN_SYS_TYPES_H
51 #   include <sys/types.h>
52 #elif defined(BOOLEAN_T_IN_PTHREAD_H)
53 #   include <pthread.h>
54 #elif defined(BOOLEAN_T_IN_CTHREADS_H)
55 #   include <cthreads.h>
56 #else
57 typedef int                 boolean_t;
58 #endif
59 #ifdef SYS_GNU
60 #   define _MACH_I386_BOOLEAN_H_
61 #endif
62
63 /* ptrdiff_t definition */
64 #ifdef HAVE_STDDEF_H
65 #   include <stddef.h>
66 #else
67 #   include <malloc.h>
68 #   ifndef _PTRDIFF_T
69 #       define _PTRDIFF_T
70 /* Not portable in a 64-bit environment. */
71 typedef int                 ptrdiff_t;
72 #   endif
73 #endif
74
75 /* Counter for statistics and profiling */
76 typedef unsigned long       count_t;
77
78 /* DCT elements types */
79 typedef s16                 dctelem_t;
80
81 /* Video buffer types */
82 typedef u8                  yuv_data_t;
83
84 /*****************************************************************************
85  * mtime_t: high precision date or time interval
86  *****************************************************************************
87  * Store an high precision date or time interval. The maximum precision is the
88  * micro-second, and a 64 bits integer is used to avoid any overflow (maximum
89  * time interval is then 292271 years, which should be long enough for any
90  * video). Date are stored as a time interval since a common date.
91  * Note that date and time intervals can be manipulated using regular
92  * arithmetic operators, and that no special functions are required.
93  *****************************************************************************/
94 typedef s64 mtime_t;
95
96 /*****************************************************************************
97  * Classes declaration
98  *****************************************************************************/
99
100 /* Plugins */
101 struct plugin_bank_s;
102 struct plugin_info_s;
103
104 typedef struct plugin_bank_s *          p_plugin_bank_t;
105 typedef struct plugin_info_s *          p_plugin_info_t;
106
107 /* Plugins */
108 struct playlist_s;
109 struct playlist_item_s;
110 struct module_s;
111
112 typedef struct playlist_s *             p_playlist_t;
113 typedef struct playlist_item_s *        p_playlist_item_t;
114
115 /* Interface */
116 struct intf_thread_s;
117 struct intf_sys_s;
118 struct intf_console_s;
119 struct intf_msg_s;
120 struct intf_channel_s;
121
122 typedef struct intf_thread_s *          p_intf_thread_t;
123 typedef struct intf_sys_s *             p_intf_sys_t;
124 typedef struct intf_console_s *         p_intf_console_t;
125 typedef struct intf_msg_s *             p_intf_msg_t;
126 typedef struct intf_channel_s *         p_intf_channel_t;
127
128 /* Input */
129 struct input_thread_s;
130 struct input_channel_s;
131 struct input_cfg_s;
132 struct input_area_s;
133
134 typedef struct input_thread_s *         p_input_thread_t;
135 typedef struct input_channel_s *        p_input_channel_t;
136 typedef struct input_cfg_s *            p_input_cfg_t;
137 typedef struct input_area_s *           p_input_area_t;
138
139 /* Audio */
140 struct aout_thread_s;
141 struct aout_sys_s;
142
143 typedef struct aout_thread_s *          p_aout_thread_t;
144 typedef struct aout_sys_s *             p_aout_sys_t;
145
146 /* Video */
147 struct vout_thread_s;
148 struct vout_font_s;
149 struct vout_sys_s;
150 struct chroma_sys_s;
151 struct vdec_thread_s;
152 struct vpar_thread_s;
153 struct video_parser_s;
154
155 typedef struct vout_thread_s *          p_vout_thread_t;
156 typedef struct vout_font_s *            p_vout_font_t;
157 typedef struct vout_sys_s *             p_vout_sys_t;
158 typedef struct chroma_sys_s *           p_chroma_sys_t;
159 typedef struct vdec_thread_s *          p_vdec_thread_t;
160 typedef struct vpar_thread_s *          p_vpar_thread_t;
161 typedef struct video_parser_s *         p_video_parser_t;
162
163 /* Decoders */
164 struct decoder_config_s;
165 struct decoder_fifo_s;
166
167 /* Misc */
168 struct macroblock_s;
169 struct data_packet_s;
170 struct imdct_s;
171 struct complex_s;
172 struct dm_par_s;
173 struct picture_s;
174 struct picture_sys_s;
175 struct picture_heap_s;
176 struct es_descriptor_s;
177 struct pgrm_descriptor_s;
178 struct pes_packet_s;
179 struct input_area_s;
180 struct bit_stream_s;
181 struct probedata_s;
182
183 /*****************************************************************************
184  * Macros and inline functions
185  *****************************************************************************/
186 #ifdef NTOHL_IN_SYS_PARAM_H
187 #   include <sys/param.h>
188
189 #elif defined(WIN32)
190 /* Swap bytes in 16 bit value.  */
191 #   define __bswap_constant_16(x) \
192      ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
193
194 #   if defined __GNUC__ && __GNUC__ >= 2
195 #       define __bswap_16(x) \
196             (__extension__                                                    \
197              ({ register unsigned short int __v;                              \
198                 if (__builtin_constant_p (x))                                 \
199                   __v = __bswap_constant_16 (x);                              \
200                 else                                                          \
201                   __asm__ __volatile__ ("rorw $8, %w0"                        \
202                                         : "=r" (__v)                          \
203                                         : "0" ((unsigned short int) (x))      \
204                                         : "cc");                              \
205                 __v; }))
206 #   else
207 /* This is better than nothing.  */
208 #       define __bswap_16(x) __bswap_constant_16 (x)
209 #   endif
210
211 /* Swap bytes in 32 bit value.  */
212 #   define __bswap_constant_32(x) \
213         ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |            \
214          (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
215
216 #   if defined __GNUC__ && __GNUC__ >= 2
217 /* To swap the bytes in a word the i486 processors and up provide the
218    `bswap' opcode.  On i386 we have to use three instructions.  */
219 #       if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__
220 #           define __bswap_32(x) \
221                 (__extension__                                                \
222                  ({ register unsigned int __v;                                \
223                     if (__builtin_constant_p (x))                             \
224                       __v = __bswap_constant_32 (x);                          \
225                     else                                                      \
226                       __asm__ __volatile__ ("rorw $8, %w0;"                   \
227                                             "rorl $16, %0;"                   \
228                                             "rorw $8, %w0"                    \
229                                             : "=r" (__v)                      \
230                                             : "0" ((unsigned int) (x))        \
231                                             : "cc");                          \
232                     __v; }))
233 #       else
234 #           define __bswap_32(x) \
235                 (__extension__                                                \
236                  ({ register unsigned int __v;                                \
237                     if (__builtin_constant_p (x))                             \
238                       __v = __bswap_constant_32 (x);                          \
239                     else                                                      \
240                       __asm__ __volatile__ ("bswap %0"                        \
241                                             : "=r" (__v)                      \
242                                             : "0" ((unsigned int) (x)));      \
243                     __v; }))
244 #       endif
245 #   else
246 #       define __bswap_32(x) __bswap_constant_32 (x)
247 #   endif
248
249 #   if defined __GNUC__ && __GNUC__ >= 2
250 /* Swap bytes in 64 bit value.  */
251 #       define __bswap_constant_64(x) \
252             ((((x) & 0xff00000000000000ull) >> 56)                            \
253              | (((x) & 0x00ff000000000000ull) >> 40)                          \
254              | (((x) & 0x0000ff0000000000ull) >> 24)                          \
255              | (((x) & 0x000000ff00000000ull) >> 8)                           \
256              | (((x) & 0x00000000ff000000ull) << 8)                           \
257              | (((x) & 0x0000000000ff0000ull) << 24)                          \
258              | (((x) & 0x000000000000ff00ull) << 40)                          \
259              | (((x) & 0x00000000000000ffull) << 56))
260
261 #       define __bswap_64(x) \
262             (__extension__                                                    \
263              ({ union { __extension__ unsigned long long int __ll;            \
264                         unsigned long int __l[2]; } __w, __r;                 \
265                 if (__builtin_constant_p (x))                                 \
266                   __r.__ll = __bswap_constant_64 (x);                         \
267                 else                                                          \
268                   {                                                           \
269                     __w.__ll = (x);                                           \
270                     __r.__l[0] = __bswap_32 (__w.__l[1]);                     \
271                     __r.__l[1] = __bswap_32 (__w.__l[0]);                     \
272                   }                                                           \
273                 __r.__ll; }))
274 #   endif
275
276 #else /* NTOHL_IN_SYS_PARAM_H || WIN32 */
277 #   include <netinet/in.h>
278
279 #endif /* NTOHL_IN_SYS_PARAM_H || WIN32 */
280
281 /* CEIL: division with round to nearest greater integer */
282 #define CEIL(n, d)  ( ((n) / (d)) + ( ((n) % (d)) ? 1 : 0) )
283
284 /* PAD: PAD(n, d) = CEIL(n ,d) * d */
285 #define PAD(n, d)   ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )
286
287 /* MAX and MIN: self explanatory */
288 #ifndef MAX
289 #   define MAX(a, b)   ( ((a) > (b)) ? (a) : (b) )
290 #endif
291 #ifndef MIN
292 #   define MIN(a, b)   ( ((a) < (b)) ? (a) : (b) )
293 #endif
294
295 /* MSB (big endian)/LSB (little endian) conversions - network order is always
296  * MSB, and should be used for both network communications and files. Note that
297  * byte orders other than little and big endians are not supported, but only
298  * the VAX seems to have such exotic properties - note that these 'functions'
299  * needs <netinet/in.h> or the local equivalent. */
300 /* FIXME: hton64 should be declared as an extern inline function to avoid
301  * border effects (see byteorder.h) */
302 #if WORDS_BIGENDIAN
303 #   define hton16      htons
304 #   define hton32      htonl
305 #   define hton64(i)   ( i )
306 #   define ntoh16      ntohs
307 #   define ntoh32      ntohl
308 #   define ntoh64(i)   ( i )
309 #else
310 #   define hton16      htons
311 #   define hton32      htonl
312 #   define hton64(i)   ( ((u64)(htonl((i) & 0xffffffff)) << 32) | htonl(((i) >> 32) & 0xffffffff ) )
313 #   define ntoh16      ntohs
314 #   define ntoh32      ntohl
315 #   define ntoh64      hton64
316 #endif
317
318 /* Macros with automatic casts */
319 #define U64_AT(p)   ( ntoh64 ( *( (u64 *)(p) ) ) )
320 #define U32_AT(p)   ( ntoh32 ( *( (u32 *)(p) ) ) )
321 #define U16_AT(p)   ( ntoh16 ( *( (u16 *)(p) ) ) )
322
323 /* Alignment of critical static data structures */
324 #ifdef ATTRIBUTE_ALIGNED_MAX
325 #   define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
326 #else
327 #   define ATTR_ALIGN(align)
328 #endif
329
330 /* Alignment of critical dynamic data structure */
331 #ifdef HAVE_MEMALIGN
332     /* Some systems have memalign() but no declaration for it */
333     void * memalign( size_t align, size_t size );
334 #else
335 #   ifdef HAVE_VALLOC
336         /* That's like using a hammer to kill a fly, but eh... */
337 #       include <unistd.h>
338 #       define memalign(align,size) valloc(size)
339 #   else
340         /* Assume malloc alignment is sufficient */
341 #       define memalign(align,size) malloc(size)
342 #   endif    
343 #endif
344
345 #define I64C(x)         x##LL
346
347
348 #if defined( WIN32 )
349 /* The ntoh* and hton* bytes swapping functions are provided by winsock
350  * but for conveniency and speed reasons it is better to implement them
351  * ourselves. ( several plugins use them and it is too much hassle to link
352  * winsock with each of them ;-)
353  */
354 #   undef ntoh32(x)
355 #   undef ntoh16(x)
356 #   undef ntoh64(x)
357 #   undef hton32(x)
358 #   undef hton16(x)
359 #   undef hton64(x)
360
361 #   ifdef WORDS_BIGENDIAN
362 #       define ntoh32(x)       (x)
363 #       define ntoh16(x)       (x)
364 #       define ntoh64(x)       (x)
365 #       define hton32(x)       (x)
366 #       define hton16(x)       (x)
367 #       define hton64(x)       (x)
368 #   else
369 #       define ntoh32(x)     __bswap_32 (x)
370 #       define ntoh16(x)     __bswap_16 (x)
371 #       define ntoh64(x)     __bswap_32 (x)
372 #       define hton32(x)     __bswap_32 (x)
373 #       define hton16(x)     __bswap_16 (x)
374 #       define hton64(x)     __bswap_32 (x)
375 #   endif
376
377 /* win32, cl and icl support */
378 #   if defined( _MSC_VER )
379 #       define __attribute__(x)
380 #       define __inline__      __inline
381 #       define strncasecmp     strnicmp
382 #       define strcasecmp      stricmp
383 #       define S_ISBLK(m)      (0)
384 #       define S_ISCHR(m)      (0)
385 #       define S_ISFIFO(m)     (((m)&_S_IFMT) == _S_IFIFO)
386 #       define S_ISREG(m)      (((m)&_S_IFMT) == _S_IFREG)
387 #       undef I64C(x)
388 #       define I64C(x)         x##i64
389 #   endif
390
391 /* several type definitions */
392 #   if defined( __MINGW32__ )
393 #       if !defined( _OFF_T_ )
394 typedef long long _off_t;
395 typedef _off_t off_t;
396 #           define _OFF_T_
397 #       else
398 #           define off_t long long
399 #       endif
400 #   endif
401
402 #   if defined( _MSC_VER )
403 #       if !defined( _OFF_T_DEFINED )
404 typedef __int64 off_t;
405 #           define _OFF_T_DEFINED
406 #       else
407 #           define off_t __int64
408 #       endif
409 #       define stat _stati64
410 #   endif
411
412 #   ifndef snprintf
413 #       define snprintf _snprintf  /* snprintf not defined in mingw32 (bug?) */
414 #   endif
415
416 #endif
417
418 /*****************************************************************************
419  * CPU capabilities
420  *****************************************************************************/
421 #define CPU_CAPABILITY_NONE    0
422 #define CPU_CAPABILITY_486     1<<0
423 #define CPU_CAPABILITY_586     1<<1
424 #define CPU_CAPABILITY_PPRO    1<<2
425 #define CPU_CAPABILITY_MMX     1<<3
426 #define CPU_CAPABILITY_3DNOW   1<<4
427 #define CPU_CAPABILITY_MMXEXT  1<<5
428 #define CPU_CAPABILITY_SSE     1<<6
429 #define CPU_CAPABILITY_ALTIVEC 1<<16
430 #define CPU_CAPABILITY_FPU     1<<31
431
432 /*****************************************************************************
433  * I18n stuff
434  *****************************************************************************/
435 #if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT )
436 #   include <libintl.h>
437 #else
438 #   define _(String) (String)
439 #   define N_(String) (String)
440 #   define textdomain(Domain)
441 #   define bindtextdomain(Package, Directory) 1
442 #endif
443
444 /*****************************************************************************
445  * Plug-in stuff
446  *****************************************************************************/
447 typedef struct module_symbols_s
448 {
449     struct main_s* p_main;
450     struct aout_bank_s* p_aout_bank;
451     struct vout_bank_s* p_vout_bank;
452
453     int    ( * main_GetIntVariable ) ( char *, int );
454     char * ( * main_GetPszVariable ) ( char *, char * );
455     void   ( * main_PutIntVariable ) ( char *, int );
456     void   ( * main_PutPszVariable ) ( char *, char * );
457
458     int  ( * intf_ProcessKey ) ( struct intf_thread_s *, int );
459     void ( * intf_AssignKey )  ( struct intf_thread_s *, int, int, int );
460
461     void ( * intf_Msg )        ( char *, ... );
462     void ( * intf_ErrMsg )     ( char *, ... );
463     void ( * intf_StatMsg )    ( char *, ... );
464     void ( * intf_WarnMsg )    ( int, char *, ... );
465     void ( * intf_WarnMsgImm ) ( int, char *, ... );
466 #ifdef TRACE
467     void ( * intf_DbgMsg )     ( char *, char *, int, char *, ... );
468     void ( * intf_DbgMsgImm )  ( char *, char *, int, char *, ... );
469 #endif
470
471     int  ( * intf_PlaylistAdd )     ( struct playlist_s *, int, const char* );
472     int  ( * intf_PlaylistDelete )  ( struct playlist_s *, int );
473     void ( * intf_PlaylistNext )    ( struct playlist_s * );
474     void ( * intf_PlaylistPrev )    ( struct playlist_s * );
475     void ( * intf_PlaylistDestroy ) ( struct playlist_s * );
476     void ( * intf_PlaylistJumpto )  ( struct playlist_s *, int );
477     void ( * intf_UrlDecode )       ( char * );
478
479     void    ( * msleep )         ( mtime_t );
480     mtime_t ( * mdate )          ( void );
481
482     int  ( * network_ChannelCreate )( void );
483     int  ( * network_ChannelJoin )  ( int );
484
485     int  ( * input_SetProgram )     ( struct input_thread_s *,
486                                       struct pgrm_descriptor_s * );
487     void ( * input_SetStatus )      ( struct input_thread_s *, int );
488     void ( * input_Seek )           ( struct input_thread_s *, off_t );
489     void ( * input_DumpStream )     ( struct input_thread_s * );
490     char * ( * input_OffsetToTime ) ( struct input_thread_s *, char *, off_t );
491     int  ( * input_ChangeES )       ( struct input_thread_s *,
492                                       struct es_descriptor_s *, u8 );
493     int  ( * input_ToggleES )       ( struct input_thread_s *,
494                                       struct es_descriptor_s *, boolean_t );
495     int  ( * input_ChangeArea )     ( struct input_thread_s *,
496                                       struct input_area_s * );
497     struct es_descriptor_s * ( * input_FindES ) ( struct input_thread_s *,
498                                                   u16 );
499     struct es_descriptor_s * ( * input_AddES ) ( struct input_thread_s *,
500                                       struct pgrm_descriptor_s *, u16, size_t );
501     void ( * input_DelES )          ( struct input_thread_s *,
502                                       struct es_descriptor_s * );
503     int  ( * input_SelectES )       ( struct input_thread_s *,
504                                       struct es_descriptor_s * );
505     int  ( * input_UnselectES )     ( struct input_thread_s *,
506                                       struct es_descriptor_s * );
507     struct pgrm_descriptor_s* ( * input_AddProgram ) ( struct input_thread_s *,
508                                                        u16, size_t );
509     void ( * input_DelProgram )     ( struct input_thread_s *,
510                                       struct pgrm_descriptor_s * );
511     struct input_area_s * ( * input_AddArea ) ( struct input_thread_s * );
512     void ( * input_DelArea )        ( struct input_thread_s *,
513                                       struct input_area_s * );
514
515     void ( * InitBitstream )        ( struct bit_stream_s *,
516                                       struct decoder_fifo_s *,
517                                       void ( * ) ( struct bit_stream_s *,
518                                                    boolean_t ),
519                                       void * );
520     void ( * DecoderError )         ( struct decoder_fifo_s * p_fifo );
521     int  ( * input_InitStream )     ( struct input_thread_s *, size_t );
522     void ( * input_EndStream )      ( struct input_thread_s * );
523
524     void ( * input_ParsePES )       ( struct input_thread_s *,
525                                       struct es_descriptor_s * );
526     void ( * input_GatherPES )      ( struct input_thread_s *,
527                                       struct data_packet_s *,
528                                       struct es_descriptor_s *,
529                                       boolean_t, boolean_t );
530     void ( * input_DecodePES )      ( struct decoder_fifo_s *,
531                                       struct pes_packet_s * );
532     struct es_descriptor_s * ( * input_ParsePS ) ( struct input_thread_s *,
533                                                    struct data_packet_s * );
534     void ( * input_DemuxPS )        ( struct input_thread_s *,
535                                       struct data_packet_s * );
536     void ( * input_DemuxTS )        ( struct input_thread_s *,
537                                       struct data_packet_s * );
538     void ( * input_DemuxPSI )       ( struct input_thread_s *,
539                                       struct data_packet_s *,
540                                       struct es_descriptor_s *, 
541                                       boolean_t, boolean_t );
542
543     int ( * input_ClockManageControl )   ( struct input_thread_s *,
544                                            struct pgrm_descriptor_s *,
545                                            mtime_t );
546
547     struct aout_fifo_s * ( * aout_CreateFifo ) 
548                                        ( int, int, long, long, long, void * );
549     void ( * aout_DestroyFifo )     ( struct aout_fifo_s * );
550
551     struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, u64, int );
552     void  ( * vout_DestroyThread )  ( struct vout_thread_s *, int * );
553
554     struct picture_s * ( * vout_CreatePicture )
555                                     ( struct vout_thread_s *,
556                                       boolean_t, boolean_t, boolean_t ); 
557     void  ( * vout_AllocatePicture )( struct picture_s *, int, int, int );
558     void  ( * vout_DisplayPicture ) ( struct vout_thread_s *, 
559                                       struct picture_s * );
560     void  ( * vout_DestroyPicture ) ( struct vout_thread_s *,
561                                       struct picture_s * );
562     void  ( * vout_LinkPicture )    ( struct vout_thread_s *,
563                                       struct picture_s * );
564     void  ( * vout_UnlinkPicture )  ( struct vout_thread_s *,
565                                       struct picture_s * );
566     void  ( * vout_DatePicture )    ( struct vout_thread_s *, 
567                                       struct picture_s *, mtime_t );
568     void  ( * vout_PlacePicture )   ( struct vout_thread_s *, int, int,
569                                       int *, int *, int *, int * );
570
571     struct subpicture_s * (* vout_CreateSubPicture)
572                                         ( struct vout_thread_s *, int, int );
573     void  ( * vout_DestroySubPicture )  ( struct vout_thread_s *, 
574                                           struct subpicture_s * );
575     void  ( * vout_DisplaySubPicture )  ( struct vout_thread_s *, 
576                                           struct subpicture_s * );
577     
578     u32  ( * UnalignedShowBits )    ( struct bit_stream_s *, unsigned int );
579     void ( * UnalignedRemoveBits )  ( struct bit_stream_s * );
580     u32  ( * UnalignedGetBits )     ( struct bit_stream_s *, unsigned int );
581
582     char * ( * DecodeLanguage ) ( u16 );
583
584     struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * );
585     void ( * module_Unneed )            ( struct module_s * );
586 } module_symbols_t;
587
588 #ifdef PLUGIN
589 extern module_symbols_t* p_symbols;
590 #endif
591
592 /*****************************************************************************
593  * Required vlc headers
594  *****************************************************************************/
595 #ifdef SYS_BEOS
596 #   include "beos_specific.h"
597 #endif
598 #ifdef SYS_DARWIN
599 #   include "darwin_specific.h"
600 #endif
601 #ifdef WIN32
602 #   include "win32_specific.h"
603 #endif
604
605 #include "intf_msg.h"
606 #include "threads.h"
607 #include "mtime.h"
608 #include "modules.h"
609
610 #include "main.h"
611