27 #define SPA_VERSION_HANDLE 0
54 #define spa_handle_get_interface(h,...) (h)->get_interface((h),__VA_ARGS__)
55 #define spa_handle_clear(h) (h)->clear((h))
81 for (i = 0; i < n_support; i++) {
82 if (strcmp(support[i].type, type) == 0)
83 return support[i].
data;
88 #define SPA_SUPPORT_INIT(type,data) ((struct spa_support) { (type), (data) })
92 #define SPA_VERSION_HANDLE_FACTORY 1
161 #define spa_handle_factory_get_size(h,...) (h)->get_size((h),__VA_ARGS__)
162 #define spa_handle_factory_init(h,...) (h)->init((h),__VA_ARGS__)
163 #define spa_handle_factory_enum_interface_info(h,...) (h)->enum_interface_info((h),__VA_ARGS__)
177 #define SPA_HANDLE_FACTORY_ENUM_FUNC_NAME "spa_handle_factory_enum"
192 #define SPA_KEY_FACTORY_NAME "factory.name"
193 #define SPA_KEY_FACTORY_AUTHOR "factory.author"
194 #define SPA_KEY_FACTORY_DESCRIPTION "factory.description"
195 #define SPA_KEY_FACTORY_USAGE "factory.usage"
197 #define SPA_KEY_LIBRARY_NAME "library.name"
int(* spa_handle_factory_enum_func_t)(const struct spa_handle_factory **factory, uint32_t *index)
The function signature of the entry point in a plugin.
Definition: plugin.h:182
static void * spa_support_find(const struct spa_support *support, uint32_t n_support, const char *type)
Find a support item of the given type.
Definition: plugin.h:82
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
The entry point in a plugin.
Definition: utils/dict.h:39
int(* enum_interface_info)(const struct spa_handle_factory *factory, const struct spa_interface_info **info, uint32_t *index)
spa_handle_factory::enum_interface_info:
Definition: plugin.h:164
uint32_t version
Definition: plugin.h:101
const struct spa_dict * info
Extra information about the handles of this factory.
Definition: plugin.h:119
size_t(* get_size)(const struct spa_handle_factory *factory, const struct spa_dict *params)
Get the size of handles from this factory.
Definition: plugin.h:127
int(* init)(const struct spa_handle_factory *factory, struct spa_handle *handle, const struct spa_dict *info, const struct spa_support *support, uint32_t n_support)
Initialize an instance of this factory.
Definition: plugin.h:146
int(* get_interface)(struct spa_handle *handle, const char *type, void **interface)
Get the interface provided by handle with type.
Definition: plugin.h:49
int(* clear)(struct spa_handle *handle)
Clean up the memory of handle.
Definition: plugin.h:57
uint32_t version
Definition: plugin.h:34
This structure lists the information about available interfaces on handles.
Definition: plugin.h:67
const char * type
Definition: plugin.h:68
Extra supporting infrastructure passed to the init() function of a factory.
Definition: plugin.h:76
void * data
Definition: plugin.h:78
const char * type
Definition: plugin.h:77