+
+/*****************************************************************************
+ * CPU capabilities
+ *****************************************************************************/
+#define CPU_CAPABILITY_NONE 0
+#define CPU_CAPABILITY_486 (1<<0)
+#define CPU_CAPABILITY_586 (1<<1)
+#define CPU_CAPABILITY_PPRO (1<<2)
+#define CPU_CAPABILITY_MMX (1<<3)
+#define CPU_CAPABILITY_3DNOW (1<<4)
+#define CPU_CAPABILITY_MMXEXT (1<<5)
+#define CPU_CAPABILITY_SSE (1<<6)
+#define CPU_CAPABILITY_ALTIVEC (1<<16)
+#define CPU_CAPABILITY_FPU (1<<31)
+
+/*****************************************************************************
+ * I18n stuff
+ *****************************************************************************/
+#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT )
+# include <libintl.h>
+#else
+# define _(String) (String)
+# define N_(String) (String)
+#endif
+
+/*****************************************************************************
+ * Plug-in stuff
+ *****************************************************************************/
+typedef struct module_symbols_s
+{
+ struct main_s* p_main;
+ struct input_bank_s* p_input_bank;
+ struct aout_bank_s* p_aout_bank;
+ struct vout_bank_s* p_vout_bank;
+
+ int ( * config_GetIntVariable ) ( const char * );
+ char * ( * config_GetPszVariable ) ( const char * );
+ void ( * config_PutIntVariable ) ( const char *, int );
+ void ( * config_PutPszVariable ) ( const char *, char * );
+ struct module_config_s * ( * config_FindConfig ) ( const char * );
+ struct module_config_s * ( * config_Duplicate ) ( struct module_config_s *,
+ int );
+
+ struct intf_subscription_s * ( * intf_MsgSub ) ( void );
+ void ( * intf_MsgUnsub ) ( struct intf_subscription_s * );
+
+ void ( * intf_Msg ) ( char *, ... );
+ void ( * intf_ErrMsg ) ( char *, ... );
+ void ( * intf_StatMsg ) ( char *, ... );
+ void ( * intf_WarnMsg ) ( int, char *, ... );
+
+ int ( * intf_PlaylistAdd ) ( struct playlist_s *, int, const char* );
+ int ( * intf_PlaylistDelete ) ( struct playlist_s *, int );
+ void ( * intf_PlaylistNext ) ( struct playlist_s * );
+ void ( * intf_PlaylistPrev ) ( struct playlist_s * );
+ void ( * intf_PlaylistDestroy ) ( struct playlist_s * );
+ void ( * intf_PlaylistJumpto ) ( struct playlist_s *, int );
+ void ( * intf_UrlDecode ) ( char * );
+ int ( * intf_Eject ) ( const char * );
+
+ void ( * msleep ) ( mtime_t );
+ mtime_t ( * mdate ) ( void );
+ char * ( * mstrtime ) ( char *, mtime_t );
+
+ int ( * network_ChannelCreate )( void );
+ int ( * network_ChannelJoin ) ( int );
+
+ int ( * input_SetProgram ) ( struct input_thread_s *,
+ struct pgrm_descriptor_s * );
+ void ( * input_SetStatus ) ( struct input_thread_s *, int );
+ void ( * input_Seek ) ( struct input_thread_s *, off_t );
+ void ( * input_DumpStream ) ( struct input_thread_s * );
+ char * ( * input_OffsetToTime ) ( struct input_thread_s *, char *, off_t );
+ int ( * input_ChangeES ) ( struct input_thread_s *,
+ struct es_descriptor_s *, u8 );
+ int ( * input_ToggleES ) ( struct input_thread_s *,
+ struct es_descriptor_s *, boolean_t );
+ int ( * input_ChangeArea ) ( struct input_thread_s *,
+ struct input_area_s * );
+ int ( * input_ChangeProgram ) ( struct input_thread_s *, u16 );
+ struct es_descriptor_s * ( * input_FindES ) ( struct input_thread_s *,
+ u16 );
+ struct es_descriptor_s * ( * input_AddES ) ( struct input_thread_s *,
+ struct pgrm_descriptor_s *, u16, size_t );
+ void ( * input_DelES ) ( struct input_thread_s *,
+ struct es_descriptor_s * );
+ int ( * input_SelectES ) ( struct input_thread_s *,
+ struct es_descriptor_s * );
+ int ( * input_UnselectES ) ( struct input_thread_s *,
+ struct es_descriptor_s * );
+ struct pgrm_descriptor_s* ( * input_AddProgram ) ( struct input_thread_s *,
+ u16, size_t );
+ void ( * input_DelProgram ) ( struct input_thread_s *,
+ struct pgrm_descriptor_s * );
+ struct input_area_s * ( * input_AddArea ) ( struct input_thread_s * );
+ void ( * input_DelArea ) ( struct input_thread_s *,
+ struct input_area_s * );
+
+ void ( * InitBitstream ) ( struct bit_stream_s *,
+ struct decoder_fifo_s *,
+ void ( * ) ( struct bit_stream_s *,
+ boolean_t ),
+ void * );
+ void ( * BitstreamNextDataPacket )( struct bit_stream_s * );
+ boolean_t ( * NextDataPacket ) ( struct decoder_fifo_s *,
+ struct data_packet_s ** );
+ void ( * DecoderError ) ( struct decoder_fifo_s * p_fifo );
+ int ( * input_InitStream ) ( struct input_thread_s *, size_t );
+ void ( * input_EndStream ) ( struct input_thread_s * );
+
+ void ( * input_ParsePES ) ( struct input_thread_s *,
+ struct es_descriptor_s * );
+ void ( * input_GatherPES ) ( struct input_thread_s *,
+ struct data_packet_s *,
+ struct es_descriptor_s *,
+ boolean_t, boolean_t );
+ void ( * input_DecodePES ) ( struct decoder_fifo_s *,
+ struct pes_packet_s * );
+ struct es_descriptor_s * ( * input_ParsePS ) ( struct input_thread_s *,
+ struct data_packet_s * );
+ ssize_t ( * input_ReadPS ) ( struct input_thread_s *,
+ struct data_packet_s ** );
+ void ( * input_DemuxPS ) ( struct input_thread_s *,
+ struct data_packet_s * );
+ ssize_t ( * input_ReadTS ) ( struct input_thread_s *,
+ struct data_packet_s ** );
+ void ( * input_DemuxTS ) ( struct input_thread_s *,
+ struct data_packet_s * );
+ void ( * input_DemuxPSI ) ( struct input_thread_s *,
+ struct data_packet_s *,
+ struct es_descriptor_s *,
+ boolean_t, boolean_t );
+ int ( * input_ClockManageControl ) ( struct input_thread_s *,
+ struct pgrm_descriptor_s *,
+ mtime_t );
+ void ( * input_FDSeek ) ( struct input_thread_s *, off_t );
+ void ( * input_FDClose ) ( struct input_thread_s * );
+ ssize_t ( * input_FDRead ) ( struct input_thread_s *, byte_t *,
+ size_t );
+ ssize_t ( * input_FDNetworkRead ) ( struct input_thread_s *, byte_t *,
+ size_t );
+
+ void * ( * input_BuffersInit )( void );
+ void ( * input_BuffersEnd )( struct input_buffers_s * );
+ struct data_buffer_s * ( * input_NewBuffer )( struct input_buffers_s *, size_t );
+ void ( * input_ReleaseBuffer )( struct input_buffers_s *, struct data_buffer_s * );
+ struct data_packet_s * ( * input_ShareBuffer )( struct input_buffers_s *,
+ struct data_buffer_s * );
+ struct data_packet_s * ( * input_NewPacket )( struct input_buffers_s *, size_t );
+ void ( * input_DeletePacket )( struct input_buffers_s *, struct data_packet_s * );
+ struct pes_packet_s * ( * input_NewPES )( struct input_buffers_s * );
+ void ( * input_DeletePES )( struct input_buffers_s *, struct pes_packet_s * );
+ ssize_t ( * input_FillBuffer )( struct input_thread_s * );
+ ssize_t ( * input_Peek )( struct input_thread_s *, byte_t **, size_t );
+ ssize_t ( * input_SplitBuffer )( struct input_thread_s *, struct data_packet_s **, size_t );
+ int ( * input_AccessInit )( struct input_thread_s * );
+ void ( * input_AccessReinit )( struct input_thread_s * );
+ void ( * input_AccessEnd )( struct input_thread_s * );
+
+ struct aout_fifo_s * ( * aout_CreateFifo ) ( int, int, int, int, void * );
+ void ( * aout_DestroyFifo ) ( struct aout_fifo_s * );
+
+ struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, u32, int );
+ void ( * vout_DestroyThread ) ( struct vout_thread_s *, int * );
+
+ struct picture_s * ( * vout_CreatePicture )
+ ( struct vout_thread_s *,
+ boolean_t, boolean_t, boolean_t );
+ void ( * vout_AllocatePicture )( struct picture_s *, int, int, u32 );
+ void ( * vout_DisplayPicture ) ( struct vout_thread_s *,
+ struct picture_s * );
+ void ( * vout_DestroyPicture ) ( struct vout_thread_s *,
+ struct picture_s * );
+ void ( * vout_LinkPicture ) ( struct vout_thread_s *,
+ struct picture_s * );
+ void ( * vout_UnlinkPicture ) ( struct vout_thread_s *,
+ struct picture_s * );
+ void ( * vout_DatePicture ) ( struct vout_thread_s *,
+ struct picture_s *, mtime_t );
+ void ( * vout_PlacePicture ) ( struct vout_thread_s *, int, int,
+ int *, int *, int *, int * );
+
+ struct subpicture_s * (* vout_CreateSubPicture)
+ ( struct vout_thread_s *, int, int );
+ void ( * vout_DestroySubPicture ) ( struct vout_thread_s *,
+ struct subpicture_s * );
+ void ( * vout_DisplaySubPicture ) ( struct vout_thread_s *,
+ struct subpicture_s * );
+
+ u32 ( * UnalignedShowBits ) ( struct bit_stream_s *, unsigned int );
+ void ( * UnalignedRemoveBits ) ( struct bit_stream_s * );
+ u32 ( * UnalignedGetBits ) ( struct bit_stream_s *, unsigned int );
+ void ( * CurrentPTS ) ( struct bit_stream_s *, mtime_t *,
+ mtime_t * );
+
+ char * ( * DecodeLanguage ) ( u16 );
+
+ struct module_s * ( * module_Need ) ( int, char *, void * );
+ void ( * module_Unneed ) ( struct module_s * );
+
+} module_symbols_t;
+
+#ifdef PLUGIN
+extern module_symbols_t* p_symbols;
+#endif
+