]> git.sesse.net Git - vlc/blobdiff - src/misc/modules_plugin.h
* IPv6 network module, courtesy of Alexis Guillard <alexis.guillard@bt.com>,
[vlc] / src / misc / modules_plugin.h
index da0f2211138e874d0de78beef84ea762955d40bb..e7af760dc92919038ee607834d7ac53b3bacfce1 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h,v 1.3 2002/01/07 02:12:30 sam Exp $
+ * $Id: modules_plugin.h,v 1.14 2002/03/04 23:56:38 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -86,7 +86,7 @@ module_unload( module_handle_t handle )
  * similar functions, since we want a non-NULL symbol anyway.
  *****************************************************************************/
 static __inline__ void *
-module_getsymbol( module_handle_t handle, char * psz_function )
+module_getsymbol_inner( module_handle_t handle, char * psz_function )
 {
 #ifdef SYS_BEOS
     void * p_symbol;
@@ -100,19 +100,6 @@ module_getsymbol( module_handle_t handle, char * psz_function )
         return( NULL );
     }
 
-#elif defined( SYS_DARWIN )
-    /* MacOS X dl library expects symbols to begin with "_". That's
-     * really lame, but hey, what can we do ? */
-    char *  psz_call = malloc( strlen( psz_function ) + 2 );
-    void *  p_return;
-    strcpy( psz_call + 1, psz_function );
-    psz_call[ 0 ] = '_';
-
-    p_return = dlsym( handle, psz_call );
-
-    free( psz_call );
-    return( p_return );
-
 #elif defined(WIN32)
     return( (void *)GetProcAddress( handle, psz_function ) );
 
@@ -122,6 +109,27 @@ module_getsymbol( module_handle_t handle, char * psz_function )
 #endif
 }
 
+static __inline__ void *
+module_getsymbol( module_handle_t handle, char * psz_function )
+{
+    void * p_symbol = module_getsymbol_inner( handle, psz_function );
+
+    /* MacOS X dl library expects symbols to begin with "_". So do
+     * some other operating systems. That's really lame, but hey, what
+     * can we do ? */
+    if( p_symbol == NULL )
+    {
+        char *psz_call = malloc( strlen( psz_function ) + 2 );
+
+        strcpy( psz_call + 1, psz_function );
+        psz_call[ 0 ] = '_';
+        p_symbol = module_getsymbol_inner( handle, psz_call );
+        free( psz_call );
+    }
+
+    return p_symbol;
+}
+
 /*****************************************************************************
  * module_error: wrapper for dlerror()
  *****************************************************************************
@@ -144,29 +152,23 @@ module_error( void )
 /*****************************************************************************
  * STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
  *****************************************************************************/
-#ifdef TRACE
-#   define STORE_TRACE_SYMBOLS( p_symbols ) \
-        (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
-        (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
-#else
-#   define STORE_TRACE_SYMBOLS( p_symbols )
-#endif
-
 #define STORE_SYMBOLS( p_symbols ) \
-    STORE_TRACE_SYMBOLS( p_symbols ) \
     (p_symbols)->p_main = p_main; \
     (p_symbols)->p_input_bank = p_input_bank; \
     (p_symbols)->p_aout_bank = p_aout_bank; \
     (p_symbols)->p_vout_bank = p_vout_bank; \
-    (p_symbols)->main_GetIntVariable = main_GetIntVariable; \
-    (p_symbols)->main_GetPszVariable = main_GetPszVariable; \
-    (p_symbols)->main_PutIntVariable = main_PutIntVariable; \
-    (p_symbols)->main_PutPszVariable = main_PutPszVariable; \
+    (p_symbols)->config_GetIntVariable = config_GetIntVariable; \
+    (p_symbols)->config_GetPszVariable = config_GetPszVariable; \
+    (p_symbols)->config_PutIntVariable = config_PutIntVariable; \
+    (p_symbols)->config_PutPszVariable = config_PutPszVariable; \
+    (p_symbols)->config_Duplicate = config_Duplicate; \
+    (p_symbols)->config_FindConfig = config_FindConfig; \
+    (p_symbols)->intf_MsgSub = intf_MsgSub; \
+    (p_symbols)->intf_MsgUnsub = intf_MsgUnsub; \
     (p_symbols)->intf_Msg = intf_Msg; \
     (p_symbols)->intf_ErrMsg = intf_ErrMsg; \
     (p_symbols)->intf_StatMsg = intf_StatMsg;\
     (p_symbols)->intf_WarnMsg = intf_WarnMsg; \
-    (p_symbols)->intf_WarnMsgImm = intf_WarnMsgImm; \
     (p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \
     (p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \
     (p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \
@@ -174,8 +176,10 @@ module_error( void )
     (p_symbols)->intf_PlaylistDestroy = intf_PlaylistDestroy; \
     (p_symbols)->intf_PlaylistJumpto = intf_PlaylistJumpto; \
     (p_symbols)->intf_UrlDecode = intf_UrlDecode; \
+    (p_symbols)->intf_Eject = intf_Eject; \
     (p_symbols)->msleep = msleep; \
     (p_symbols)->mdate = mdate; \
+    (p_symbols)->mstrtime = mstrtime; \
     (p_symbols)->network_ChannelCreate = network_ChannelCreate; \
     (p_symbols)->network_ChannelJoin = network_ChannelJoin; \
     (p_symbols)->input_SetProgram = input_SetProgram; \
@@ -185,6 +189,7 @@ module_error( void )
     (p_symbols)->input_OffsetToTime = input_OffsetToTime; \
     (p_symbols)->input_ChangeES = input_ChangeES; \
     (p_symbols)->input_ToggleES = input_ToggleES; \
+    (p_symbols)->input_ChangeProgram = input_ChangeProgram; \
     (p_symbols)->input_ChangeArea = input_ChangeArea; \
     (p_symbols)->input_FindES = input_FindES; \
     (p_symbols)->input_AddES = input_AddES; \
@@ -196,17 +201,40 @@ module_error( void )
     (p_symbols)->input_AddArea = input_AddArea; \
     (p_symbols)->input_DelArea = input_DelArea; \
     (p_symbols)->InitBitstream = InitBitstream; \
+    (p_symbols)->NextDataPacket = NextDataPacket; \
+    (p_symbols)->BitstreamNextDataPacket = BitstreamNextDataPacket; \
     (p_symbols)->DecoderError = DecoderError; \
     (p_symbols)->input_InitStream = input_InitStream; \
     (p_symbols)->input_EndStream = input_EndStream; \
     (p_symbols)->input_ParsePES = input_ParsePES; \
     (p_symbols)->input_GatherPES = input_GatherPES; \
     (p_symbols)->input_DecodePES = input_DecodePES; \
+    (p_symbols)->input_ReadPS = input_ReadPS; \
     (p_symbols)->input_ParsePS = input_ParsePS; \
     (p_symbols)->input_DemuxPS = input_DemuxPS; \
+    (p_symbols)->input_ReadTS = input_ReadTS; \
     (p_symbols)->input_DemuxTS = input_DemuxTS; \
     (p_symbols)->input_DemuxPSI = input_DemuxPSI; \
     (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
+    (p_symbols)->input_FDSeek = input_FDSeek; \
+    (p_symbols)->input_FDClose = input_FDClose; \
+    (p_symbols)->input_FDRead = input_FDRead; \
+    (p_symbols)->input_FDNetworkRead = input_FDNetworkRead; \
+    (p_symbols)->input_BuffersInit = input_BuffersInit; \
+    (p_symbols)->input_BuffersEnd = input_BuffersEnd; \
+    (p_symbols)->input_NewBuffer = input_NewBuffer; \
+    (p_symbols)->input_ReleaseBuffer = input_ReleaseBuffer; \
+    (p_symbols)->input_ShareBuffer = input_ShareBuffer; \
+    (p_symbols)->input_NewPacket = input_NewPacket; \
+    (p_symbols)->input_DeletePacket = input_DeletePacket; \
+    (p_symbols)->input_NewPES = input_NewPES; \
+    (p_symbols)->input_DeletePES = input_DeletePES; \
+    (p_symbols)->input_FillBuffer = input_FillBuffer; \
+    (p_symbols)->input_Peek = input_Peek; \
+    (p_symbols)->input_SplitBuffer = input_SplitBuffer; \
+    (p_symbols)->input_AccessInit = input_AccessInit; \
+    (p_symbols)->input_AccessReinit = input_AccessReinit; \
+    (p_symbols)->input_AccessEnd = input_AccessEnd; \
     (p_symbols)->aout_CreateFifo = aout_CreateFifo; \
     (p_symbols)->aout_DestroyFifo = aout_DestroyFifo; \
     (p_symbols)->vout_CreateThread = vout_CreateThread; \
@@ -225,8 +253,7 @@ module_error( void )
     (p_symbols)->UnalignedGetBits = UnalignedGetBits; \
     (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
     (p_symbols)->UnalignedShowBits = UnalignedShowBits; \
+    (p_symbols)->CurrentPTS = CurrentPTS; \
     (p_symbols)->DecodeLanguage = DecodeLanguage; \
     (p_symbols)->module_Need = module_Need; \
     (p_symbols)->module_Unneed = module_Unneed;
-    
-