modules_export.h 10.7 KB
Newer Older
Sam Hocevar's avatar
 
Sam Hocevar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/*****************************************************************************
 * modules_export.h: macros for exporting vlc symbols to plugins
 *****************************************************************************
 * Copyright (C) 2001 VideoLAN
 *
 * Authors: Samuel Hocevar <sam@zoy.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

#define STORE_SYMBOLS( p_symbols ) \
    (p_symbols)->p_main = p_main; \
    (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)->TestProgram = TestProgram; \
    (p_symbols)->TestMethod = TestMethod; \
    (p_symbols)->TestCPU = TestCPU; \
    (p_symbols)->intf_Msg = intf_Msg; \
    (p_symbols)->intf_ErrMsg = intf_ErrMsg; \
Henri Fallon's avatar
 
Henri Fallon committed
36
    (p_symbols)->intf_StatMsg = intf_StatMsg;\
Sam Hocevar's avatar
 
Sam Hocevar committed
37
    (p_symbols)->intf_WarnMsg = intf_WarnMsg; \
Sam Hocevar's avatar
 
Sam Hocevar committed
38
    (p_symbols)->intf_WarnMsgImm = intf_WarnMsgImm; \
Sam Hocevar's avatar
 
Sam Hocevar committed
39 40 41 42 43 44 45 46 47
    (p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \
    (p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \
    (p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \
    (p_symbols)->intf_PlaylistPrev = intf_PlaylistPrev; \
    (p_symbols)->intf_PlaylistDestroy = intf_PlaylistDestroy; \
    (p_symbols)->intf_PlaylistJumpto = intf_PlaylistJumpto; \
    (p_symbols)->intf_UrlDecode = intf_UrlDecode; \
    (p_symbols)->msleep = msleep; \
    (p_symbols)->mdate = mdate; \
48
    (p_symbols)->network_ChannelCreate = network_ChannelCreate; \
Sam Hocevar's avatar
 
Sam Hocevar committed
49
    (p_symbols)->network_ChannelJoin = network_ChannelJoin; \
Sam Hocevar's avatar
 
Sam Hocevar committed
50
    (p_symbols)->input_SetProgram = input_SetProgram; \
Sam Hocevar's avatar
 
Sam Hocevar committed
51 52 53 54 55 56
    (p_symbols)->input_SetStatus = input_SetStatus; \
    (p_symbols)->input_Seek = input_Seek; \
    (p_symbols)->input_DumpStream = input_DumpStream; \
    (p_symbols)->input_OffsetToTime = input_OffsetToTime; \
    (p_symbols)->input_ChangeES = input_ChangeES; \
    (p_symbols)->input_ToggleES = input_ToggleES; \
Sam Hocevar's avatar
 
Sam Hocevar committed
57 58 59 60 61 62 63 64 65 66
    (p_symbols)->input_ChangeArea = input_ChangeArea; \
    (p_symbols)->input_FindES = input_FindES; \
    (p_symbols)->input_AddES = input_AddES; \
    (p_symbols)->input_DelES = input_DelES; \
    (p_symbols)->input_SelectES = input_SelectES; \
    (p_symbols)->input_UnselectES = input_UnselectES; \
    (p_symbols)->input_AddProgram = input_AddProgram; \
    (p_symbols)->input_DelProgram = input_DelProgram; \
    (p_symbols)->input_AddArea = input_AddArea; \
    (p_symbols)->input_DelArea = input_DelArea; \
Sam Hocevar's avatar
 
Sam Hocevar committed
67
    (p_symbols)->InitBitstream = InitBitstream; \
Sam Hocevar's avatar
 
Sam Hocevar committed
68 69 70 71
    (p_symbols)->input_InitStream = input_InitStream; \
    (p_symbols)->input_EndStream = input_EndStream; \
    (p_symbols)->input_ParsePES = input_ParsePES; \
    (p_symbols)->input_GatherPES = input_GatherPES; \
Sam Hocevar's avatar
 
Sam Hocevar committed
72
    (p_symbols)->input_DecodePES = input_DecodePES; \
Sam Hocevar's avatar
 
Sam Hocevar committed
73 74 75 76
    (p_symbols)->input_ParsePS = input_ParsePS; \
    (p_symbols)->input_DemuxPS = input_DemuxPS; \
    (p_symbols)->input_DemuxTS = input_DemuxTS; \
    (p_symbols)->input_DemuxPSI = input_DemuxPSI; \
Sam Hocevar's avatar
 
Sam Hocevar committed
77
    (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
Sam Hocevar's avatar
 
Sam Hocevar committed
78 79 80 81
    (p_symbols)->input_NetlistInit = input_NetlistInit; \
    (p_symbols)->input_NetlistGetiovec = input_NetlistGetiovec; \
    (p_symbols)->input_NetlistMviovec = input_NetlistMviovec; \
    (p_symbols)->input_NetlistNewPacket = input_NetlistNewPacket; \
82
    (p_symbols)->input_NetlistNewPtr = input_NetlistNewPtr; \
Sam Hocevar's avatar
 
Sam Hocevar committed
83 84 85
    (p_symbols)->input_NetlistNewPES = input_NetlistNewPES; \
    (p_symbols)->input_NetlistDeletePacket = input_NetlistDeletePacket; \
    (p_symbols)->input_NetlistDeletePES = input_NetlistDeletePES; \
Henri Fallon's avatar
 
Henri Fallon committed
86 87 88 89
    (p_symbols)->input_NetlistEnd = input_NetlistEnd; \
    (p_symbols)->aout_CreateFifo = aout_CreateFifo; \
    (p_symbols)->aout_DestroyFifo = aout_DestroyFifo; \
    (p_symbols)->vout_CreateThread = vout_CreateThread; \
Sam Hocevar's avatar
 
Sam Hocevar committed
90
    (p_symbols)->vout_DestroyThread = vout_DestroyThread; \
Henri Fallon's avatar
 
Henri Fallon committed
91 92 93 94
    (p_symbols)->vout_CreateSubPicture = vout_CreateSubPicture; \
    (p_symbols)->vout_DestroySubPicture = vout_DestroySubPicture; \
    (p_symbols)->vout_DisplaySubPicture = vout_DisplaySubPicture; \
    (p_symbols)->vout_CreatePicture = vout_CreatePicture; \
Sam Hocevar's avatar
 
Sam Hocevar committed
95
    (p_symbols)->vout_AllocatePicture = vout_AllocatePicture; \
Henri Fallon's avatar
 
Henri Fallon committed
96 97 98 99 100
    (p_symbols)->vout_DisplayPicture = vout_DisplayPicture; \
    (p_symbols)->vout_DestroyPicture = vout_DestroyPicture; \
    (p_symbols)->vout_DatePicture = vout_DatePicture; \
    (p_symbols)->vout_LinkPicture = vout_LinkPicture; \
    (p_symbols)->vout_UnlinkPicture = vout_UnlinkPicture; \
Sam Hocevar's avatar
 
Sam Hocevar committed
101
    (p_symbols)->vout_PlacePicture = vout_PlacePicture; \
Henri Fallon's avatar
 
Henri Fallon committed
102 103 104
    (p_symbols)->UnalignedGetBits = UnalignedGetBits; \
    (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
    (p_symbols)->UnalignedShowBits = UnalignedShowBits; \
Gildas Bazin's avatar
 
Gildas Bazin committed
105
    (p_symbols)->DecodeLanguage = DecodeLanguage; \
Henri Fallon's avatar
 
Henri Fallon committed
106 107
    (p_symbols)->module_Need = module_Need; \
    (p_symbols)->module_Unneed = module_Unneed;
Sam Hocevar's avatar
 
Sam Hocevar committed
108
    
Gildas Bazin's avatar
 
Gildas Bazin committed
109 110 111 112
#define STORE_TRACE_SYMBOLS( p_symbols ) \
    (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
    (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;

Sam Hocevar's avatar
 
Sam Hocevar committed
113 114 115 116 117 118 119 120 121 122 123
#ifdef PLUGIN
#   define p_aout_bank (p_symbols->p_aout_bank)
#   define p_vout_bank (p_symbols->p_vout_bank)

#   define main_GetIntVariable(a,b) p_symbols->main_GetIntVariable(a,b)
#   define main_PutIntVariable(a,b) p_symbols->main_PutIntVariable(a,b)
#   define main_GetPszVariable(a,b) p_symbols->main_GetPszVariable(a,b)
#   define main_PutPszVariable(a,b) p_symbols->main_PutPszVariable(a,b)

#   define TestProgram(a) p_symbols->TestProgram(a)
#   define TestMethod(a,b) p_symbols->TestMethod(a,b)
Sam Hocevar's avatar
 
Sam Hocevar committed
124
#   define TestCPU(a) p_symbols->TestCPU(a)
Sam Hocevar's avatar
 
Sam Hocevar committed
125

Sam Hocevar's avatar
 
Sam Hocevar committed
126 127
#   define intf_Msg p_symbols->intf_Msg
#   define intf_ErrMsg p_symbols->intf_ErrMsg
Henri Fallon's avatar
 
Henri Fallon committed
128
#   define intf_StatMsg p_symbols->intf_StatMsg
Sam Hocevar's avatar
 
Sam Hocevar committed
129
#   define intf_WarnMsg p_symbols->intf_WarnMsg
Sam Hocevar's avatar
 
Sam Hocevar committed
130
#   define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
Gildas Bazin's avatar
 
Gildas Bazin committed
131 132 133 134 135 136 137 138 139 140
#ifdef TRACE
#   undef  intf_DbgMsg
#   undef  intf_DbgMsgImm
#   define intf_DbgMsg( format, args... ) \
    p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
                            __LINE__, format, ## args )
#   define intf_DbgMsgImm( format, args... ) \
    p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
                               __LINE__, format, ## args )
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
141 142 143 144 145 146 147 148 149 150 151 152

#   define intf_PlaylistAdd(a,b,c) p_symbols->intf_PlaylistAdd(a,b,c)
#   define intf_PlaylistDelete(a,b) p_symbols->intf_PlaylistDelete(a,b)
#   define intf_PlaylistNext(a) p_symbols->intf_PlaylistNext(a)
#   define intf_PlaylistPrev(a) p_symbols->intf_PlaylistPrev(a)
#   define intf_PlaylistDestroy(a) p_symbols->intf_PlaylistDestroy(a)
#   define intf_PlaylistJumpto(a,b) p_symbols->intf_PlaylistJumpto(a,b)
#   define intf_UrlDecode(a) p_symbols->intf_UrlDecode(a)

#   define msleep(a) p_symbols->msleep(a)
#   define mdate() p_symbols->mdate()

Sam Hocevar's avatar
 
Sam Hocevar committed
153 154
#   define network_ChannelCreate p_symbols->network_ChannelCreate
#   define network_ChannelJoin p_symbols->network_ChannelJoin
Sam Hocevar's avatar
 
Sam Hocevar committed
155

Sam Hocevar's avatar
 
Sam Hocevar committed
156 157 158
#   define input_SetProgram p_symbols->input_SetProgram
#   define input_SetStatus p_symbols->input_SetStatus
#   define input_Seek p_symbols->input_Seek
Sam Hocevar's avatar
 
Sam Hocevar committed
159 160 161 162 163
#   define input_DumpStream(a) p_symbols->input_DumpStream(a)
#   define input_OffsetToTime(a,b,c) p_symbols->input_OffsetToTime(a,b,c)
#   define input_ChangeES(a,b,c) p_symbols->input_ChangeES(a,b,c)
#   define input_ToggleES(a,b,c) p_symbols->input_ToggleES(a,b,c)
#   define input_ChangeArea(a,b) p_symbols->input_ChangeArea(a,b)
Sam Hocevar's avatar
 
Sam Hocevar committed
164 165 166 167 168 169 170 171 172 173
#   define input_FindES p_symbols->input_FindES
#   define input_AddES p_symbols->input_AddES
#   define input_DelES p_symbols->input_DelES
#   define input_SelectES p_symbols->input_SelectES
#   define input_UnselectES p_symbols->input_UnselectES
#   define input_AddProgram p_symbols->input_AddProgram
#   define input_DelProgram p_symbols->input_DelProgram
#   define input_AddArea p_symbols->input_AddArea
#   define input_DelArea p_symbols->input_DelArea

Sam Hocevar's avatar
 
Sam Hocevar committed
174
#   define InitBitstream p_symbols->InitBitstream
Sam Hocevar's avatar
 
Sam Hocevar committed
175 176 177 178 179
#   define input_InitStream p_symbols->input_InitStream
#   define input_EndStream p_symbols->input_EndStream

#   define input_ParsePES p_symbols->input_ParsePES
#   define input_GatherPES p_symbols->input_GatherPES
Sam Hocevar's avatar
 
Sam Hocevar committed
180
#   define input_DecodePES p_symbols->input_DecodePES
Sam Hocevar's avatar
 
Sam Hocevar committed
181 182 183 184 185
#   define input_ParsePS p_symbols->input_ParsePS
#   define input_DemuxPS p_symbols->input_DemuxPS
#   define input_DemuxTS p_symbols->input_DemuxTS
#   define input_DemuxPSI p_symbols->input_DemuxPSI

Sam Hocevar's avatar
 
Sam Hocevar committed
186 187
#   define input_ClockManageControl p_symbols->input_ClockManageControl

Sam Hocevar's avatar
 
Sam Hocevar committed
188 189 190 191
#   define input_NetlistInit p_symbols->input_NetlistInit
#   define input_NetlistGetiovec p_symbols->input_NetlistGetiovec
#   define input_NetlistMviovec p_symbols->input_NetlistMviovec
#   define input_NetlistNewPacket p_symbols->input_NetlistNewPacket
Gildas Bazin's avatar
 
Gildas Bazin committed
192
#   define input_NetlistNewPtr p_symbols->input_NetlistNewPtr
Sam Hocevar's avatar
 
Sam Hocevar committed
193 194 195 196
#   define input_NetlistNewPES p_symbols->input_NetlistNewPES
#   define input_NetlistDeletePacket p_symbols->input_NetlistDeletePacket
#   define input_NetlistDeletePES p_symbols->input_NetlistDeletePES
#   define input_NetlistEnd p_symbols->input_NetlistEnd
Sam Hocevar's avatar
 
Sam Hocevar committed
197

Henri Fallon's avatar
 
Henri Fallon committed
198 199 200 201
#   define aout_CreateFifo p_symbols->aout_CreateFifo
#   define aout_DestroyFifo p_symbols->aout_DestroyFifo

#   define vout_CreateThread p_symbols->vout_CreateThread
Sam Hocevar's avatar
 
Sam Hocevar committed
202
#   define vout_DestroyThread p_symbols->vout_DestroyThread
Henri Fallon's avatar
 
Henri Fallon committed
203 204 205 206
#   define vout_CreateSubPicture p_symbols->vout_CreateSubPicture
#   define vout_DestroySubPicture p_symbols->vout_DestroySubPicture
#   define vout_DisplaySubPicture p_symbols->vout_DisplaySubPicture
#   define vout_CreatePicture p_symbols->vout_CreatePicture
Sam Hocevar's avatar
 
Sam Hocevar committed
207
#   define vout_AllocatePicture p_symbols->vout_AllocatePicture
Henri Fallon's avatar
 
Henri Fallon committed
208 209 210 211 212
#   define vout_DisplayPicture p_symbols->vout_DisplayPicture
#   define vout_DestroyPicture p_symbols->vout_DestroyPicture
#   define vout_DatePicture p_symbols->vout_DatePicture
#   define vout_LinkPicture p_symbols->vout_LinkPicture
#   define vout_UnlinkPicture p_symbols->vout_UnlinkPicture
Sam Hocevar's avatar
 
Sam Hocevar committed
213
#   define vout_PlacePicture p_symbols->vout_PlacePicture
Henri Fallon's avatar
 
Henri Fallon committed
214
    
Gildas Bazin's avatar
 
Gildas Bazin committed
215 216
#   define DecodeLanguage p_symbols->DecodeLanguage

Henri Fallon's avatar
 
Henri Fallon committed
217 218 219
#   define module_Need p_symbols->module_Need
#   define module_Unneed p_symbols->module_Unneed
    
Sam Hocevar's avatar
 
Sam Hocevar committed
220 221
#endif