25#define SP_PLUGIN_VERSION_STRING "1.7.1"
26#define SP_PLUGIN_VERSION 1
27#define SP_PLUGIN_REVISION 7
28#define SP_PLUGIN_UPDATE_LEVEL 1
29#define SP_PLUGIN_VERSION_ID (SP_PLUGIN_VERSION * 1000 + SP_PLUGIN_REVISION)
36#define SP_PLUGIN_CHECK_VERSION(version, revision, update) \
37 (SP_PLUGIN_VERSION > (version) || \
38 (SP_PLUGIN_VERSION == (version) && SP_PLUGIN_REVISION > (revision)) || \
39 (SP_PLUGIN_VERSION == (version) && SP_PLUGIN_REVISION == (revision) && SP_PLUGIN_UPDATE_LEVEL >= (update)))
41#define SP_PLUGIN_VERIFY_VERSION
42#define SP_PLUGIN_SUPPORTED_VERSION_ID 1003
48typedef const char *spPluginType;
49#define SP_PLUGIN_UNKNOWN NULL
53 SP_PLUGIN_CR_NONE = -1,
77#define SP_PLUGIN_PRIORITY_HIGHEST 0
78#define SP_PLUGIN_PRIORITY_HIGHER 1
79#define SP_PLUGIN_PRIORITY_MIDDLE 2
80#define SP_PLUGIN_PRIORITY_LOWER 3
81#define SP_PLUGIN_PRIORITY_LOWEST 4
82#define SP_PLUGIN_PRIORITY_NULL 5
86#define SP_PLUGIN_ERROR_SUCCESS SP_TRUE
87#define SP_PLUGIN_ERROR_FAILURE SP_FALSE
88#define SP_PLUGIN_ERROR_NO_ERROR SP_TRUE
89#define SP_PLUGIN_ERROR_WRONG_PLUGIN (-1)
90#define SP_PLUGIN_ERROR_OPEN (-2)
91#define SP_PLUGIN_ERROR_READ (-3)
92#define SP_PLUGIN_ERROR_WRITE (-4)
93#define SP_PLUGIN_ERROR_LOAD (-5)
94#define SP_PLUGIN_ERROR_SUITABLE_NOT_FOUND (-6)
95#define SP_PLUGIN_ERROR_MULTIPLE_INSTANCE (-7)
96#define SP_PLUGIN_ERROR_INSTANTIATE (-8)
97#define SP_PLUGIN_ERROR_BOGUS_FILE (-10)
98#define SP_PLUGIN_ERROR_FILE_TYPE (-11)
99#define SP_PLUGIN_ERROR_SAMP_RATE (-12)
100#define SP_PLUGIN_ERROR_SAMP_BIT (-13)
101#define SP_PLUGIN_ERROR_NUM_CHANNEL (-14)
102#define SP_PLUGIN_ERROR_OTHER_INFO (-15)
103#define SP_PLUGIN_ERROR_TOTAL_LENGTH_REQUIRED (-16)
104#define SP_PLUGIN_ERROR_UNKNOWN_DEVICE (-20)
105#define SP_PLUGIN_ERROR_USER (-256)
107#define SP_PLUGIN_CAPS_THREAD_SAFE (1<<1)
108#define SP_PLUGIN_CAPS_NEED_LOCK (1<<2)
109#define SP_PLUGIN_CAPS_MEMORY_SAFE (1<<3)
110#define SP_PLUGIN_CAPS_KEEP_IN_MEMORY (1<<4)
113#define SP_PLUGIN_CAPS_CUSTOM_OPTION_DIALOG (1<<5)
116#define SP_PLUGIN_CAPS_THREAD_BY_THREAD_SAFE (1<<6)
119#define SP_PLUGIN_CAPS_SUBPLUGIN_SHIFT 12
120#define SP_PLUGIN_CAPS_SUBPLUGIN (1<<SP_PLUGIN_CAPS_SUBPLUGIN_SHIFT)
122#define SP_PLUGIN_CAPS_USER_SHIFT 16
123#define SP_PLUGIN_CAPS_USER (1<<SP_PLUGIN_CAPS_USER_SHIFT)
126#define spRegisterUniquePluginRec(unique_id) \
128 extern spPluginRec *spGetPluginRec_ ## unique_id (long *, long *); \
130 if ((rec = spCallUniqueGetPluginRecFunc( spGetPluginRec_ ## unique_id )) != NULL) { \
131 spAddPluginRecList(rec, #unique_id ); \
135#define spRegisterUniquePluginRec(unique_id)
145typedef struct _spPluginRect spPluginRect;
147typedef struct _spPluginRec spPluginRec;
148typedef struct _spPluginHost spPluginHost;
151typedef struct _spIoPluginRec spIoPluginRec;
153typedef spPluginRec *(*spGetPluginRecFunc)(void);
154typedef long (*spPluginVersionFunc)(void);
155typedef spPluginRec *(*spUniqueGetPluginRecFunc)(
long *system_version_id,
long *supported_version_id);
159typedef spBool (*spSearchSpecificPluginCallback)(
spPlugin *plugin,
void *call_data);
205extern void spSetPluginLang(
const char *lang);
206extern const char *spGetPluginSearchPath(
void);
208extern spBool spAppendPluginSearchPath(
const char *pathlist);
209extern spBool spPrependPluginSearchPath(
const char *pathlist);
211extern spBool spAddPluginRecList(spPluginRec *plugin_rec,
const char *name);
212extern spBool spRemovePluginRecList(spPluginRec *plugin_rec);
213extern spBool _spRegisterPluginRec(spPluginRec *plugin_rec,
const char *name,
long system_version_id,
long supported_version_id);
214#define spRegisterPluginRec(plugin_rec, name) _spRegisterPluginRec(plugin_rec, name, SP_PLUGIN_SUPPORTED_VERSION_ID, SP_PLUGIN_VERSION_ID)
215extern spPlugin *spAllocNullPlugin(
void);
216extern spPluginRec *spCallUniqueGetPluginRecFunc(spUniqueGetPluginRecFunc func);
260extern unsigned long spGetPluginCaps(
spPlugin *plugin);
261extern spBool spIsPluginCapable(
spPlugin *plugin,
unsigned long cap);
263extern void *spGetPluginInstance(
spPlugin *plugin);
264extern long spGetNumPluginInstance(
spPlugin *plugin);
268extern spPlugin *spInstantiatePlugin(
const char *plugin_name);
273extern void spPrintPluginOptions(
spPlugin *plugin);
274extern spBool spPluginUsage(
const char *plugin_name);
277extern const char *spSearchPluginFile(
int index);
279extern void spFreePluginGlobals(
void);
281extern spBool spEqPluginNameString(
const char *name1,
const char *name2);
283extern spPlugin *spSearchSpecificPlugin(
int *index, spSearchSpecificPluginCallback call_func,
void *call_data);
284extern char *xspSearchSpecificPluginFile(
int *index, spSearchSpecificPluginCallback call_func,
void *call_data);
285extern int spGetNumSpecificPlugin(spSearchSpecificPluginCallback call_func,
void *call_data);
int spBool
Definition spDefs.h:248
struct _spOptions * spOptions
Definition spOption.h:62
void spSetPluginSearchPath(const char *pathlist)
spPluginDeviceType
Definition spPlugin.h:67
spBool spIsPluginFile(const char *filename)
int spPluginError
Definition spPlugin.h:85
char * xspSearchPluginFile(int index)
spPluginState
Definition spPlugin.h:59
spPluginCallbackReason
Definition spPlugin.h:52
@ SP_PLUGIN_DEVICE_FILE
Definition spPlugin.h:69
@ SP_PLUGIN_DEVICE_MIXER
Definition spPlugin.h:72
@ SP_PLUGIN_DEVICE_AUDIO
Definition spPlugin.h:70
@ SP_PLUGIN_DEVICE_OTHERS
Definition spPlugin.h:73
@ SP_PLUGIN_DEVICE_CD
Definition spPlugin.h:71
@ SP_PLUGIN_DEVICE_UNKNOWN
Definition spPlugin.h:68
@ SP_PLUGIN_STATE_ERROR
Definition spPlugin.h:60
@ SP_PLUGIN_STATE_STOP
Definition spPlugin.h:61
@ SP_PLUGIN_STATE_START
Definition spPlugin.h:62
@ SP_PLUGIN_STATE_PAUSE
Definition spPlugin.h:63
@ SP_PLUGIN_CR_OPTION
Definition spPlugin.h:55
@ SP_PLUGIN_CR_ERROR
Definition spPlugin.h:54
const char * spGetPluginName(spPlugin *plugin)
long spGetPluginVersionId(spPlugin *plugin)
spBool spGetPluginVersion(spPlugin *plugin, int *version, int *revision)
spPlugin * spLoadPlugin(const char *plugin_name)
spBool spEqPluginType(spPlugin *plugin, spPluginType type)
const char * spGetPluginInformation(spPlugin *plugin)
spBool spFreePlugin(spPlugin *plugin)
int spGetPluginPriority(spPlugin *plugin)
const char * spGetPluginId(spPlugin *plugin)
const char * spGetPluginDescription(spPlugin *plugin)