PipeWire  0.3.33
SPA Plugin Handles

Data Structures

struct  spa_handle
 
struct  spa_interface_info
 This structure lists the information about available interfaces on handles. More...
 
struct  spa_support
 Extra supporting infrastructure passed to the init() function of a factory. More...
 
struct  spa_handle_factory
 

Macros

#define spa_handle_get_interface(h, ...)   (h)->get_interface((h),__VA_ARGS__)
 
#define spa_handle_clear(h)   (h)->clear((h))
 
#define SPA_SUPPORT_INIT(type, data)   (struct spa_support) { (type), (data) }
 
#define spa_handle_factory_get_size(h, ...)   (h)->get_size((h),__VA_ARGS__)
 
#define spa_handle_factory_init(h, ...)   (h)->init((h),__VA_ARGS__)
 
#define spa_handle_factory_enum_interface_info(h, ...)   (h)->enum_interface_info((h),__VA_ARGS__)
 
#define SPA_HANDLE_FACTORY_ENUM_FUNC_NAME   "spa_handle_factory_enum"
 
#define SPA_KEY_FACTORY_NAME   "factory.name"
 the name of a factory More...
 
#define SPA_KEY_FACTORY_AUTHOR   "factory.author"
 a comma separated list of factory authors More...
 
#define SPA_KEY_FACTORY_DESCRIPTION   "factory.description"
 description of a factory More...
 
#define SPA_KEY_FACTORY_USAGE   "factory.usage"
 usage of a factory More...
 
#define SPA_KEY_LIBRARY_NAME   "library.name"
 the name of a library. More...
 

Typedefs

typedef 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. More...
 

Functions

void * spa_support_find (const struct spa_support *support, uint32_t n_support, const char *type)
 Find a support item of the given type. More...
 
int spa_handle_factory_enum (const struct spa_handle_factory **factory, uint32_t *index)
 The entry point in a plugin. More...
 

Detailed Description

Macro Definition Documentation

◆ spa_handle_clear

#define spa_handle_clear (   h)    (h)->clear((h))

◆ SPA_HANDLE_FACTORY_ENUM_FUNC_NAME

#define SPA_HANDLE_FACTORY_ENUM_FUNC_NAME   "spa_handle_factory_enum"

◆ spa_handle_factory_enum_interface_info

#define spa_handle_factory_enum_interface_info (   h,
  ... 
)    (h)->enum_interface_info((h),__VA_ARGS__)

◆ spa_handle_factory_get_size

#define spa_handle_factory_get_size (   h,
  ... 
)    (h)->get_size((h),__VA_ARGS__)

◆ spa_handle_factory_init

#define spa_handle_factory_init (   h,
  ... 
)    (h)->init((h),__VA_ARGS__)

◆ spa_handle_get_interface

#define spa_handle_get_interface (   h,
  ... 
)    (h)->get_interface((h),__VA_ARGS__)

◆ SPA_KEY_FACTORY_AUTHOR

#define SPA_KEY_FACTORY_AUTHOR   "factory.author"

a comma separated list of factory authors

◆ SPA_KEY_FACTORY_DESCRIPTION

#define SPA_KEY_FACTORY_DESCRIPTION   "factory.description"

description of a factory

◆ SPA_KEY_FACTORY_NAME

#define SPA_KEY_FACTORY_NAME   "factory.name"

the name of a factory

◆ SPA_KEY_FACTORY_USAGE

#define SPA_KEY_FACTORY_USAGE   "factory.usage"

usage of a factory

◆ SPA_KEY_LIBRARY_NAME

#define SPA_KEY_LIBRARY_NAME   "library.name"

the name of a library.

This is usually the filename of the plugin without the path or the plugin extension.

◆ SPA_SUPPORT_INIT

#define SPA_SUPPORT_INIT (   type,
  data 
)    (struct spa_support) { (type), (data) }

Typedef Documentation

◆ spa_handle_factory_enum_func_t

typedef 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.

Parameters
factorya location to hold the factory result
indexindex to keep track of the enumeration
Returns
1 on success 0 when there are no more factories -EINVAL when factory is NULL

Function Documentation

◆ spa_handle_factory_enum()

int spa_handle_factory_enum ( const struct spa_handle_factory **  factory,
uint32_t *  index 
)

The entry point in a plugin.

Parameters
factorya location to hold the factory result
indexindex to keep track of the enumeration
Returns
1 on success 0 when no more items are available < 0 errno type error

◆ spa_support_find()

void* spa_support_find ( const struct spa_support support,
uint32_t  n_support,
const char *  type 
)
inline

Find a support item of the given type.

Referenced by pipewire__module_init().