PipeWire: spa_handle_factory Struct Reference

PipeWire 0.3.67

Loading...
Searching...
No Matches
Data Fields
spa_handle_factory Struct Reference
SPA » Support » Plugin Handle

`#include <spa/support/plugin.h>`

## Data Fields
uint32_t | version
const struct spa_dict * | info
| Extra information about the handles of this factory.
size_t(* | get_size )(const struct spa_handle_factory *factory, const struct spa_dict *params)
| Get the size of handles from this factory.
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.
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:

## Detailed Description

Examples
  spa/examples/adapter-control.c, spa/examples/example-control.c, spa/examples/local-libcamera.c, and spa/examples/local-v4l2.c.

## Field Documentation

## ◆ version

uint32_t spa_handle_factory::version

Examples
  spa/examples/adapter-control.c, spa/examples/example-control.c, and spa/examples/local-v4l2.c.

## ◆ info

const struct spa_dict* spa_handle_factory::info

Extra information about the handles of this factory.

## ◆ get_size

size_t(* spa_handle_factory::get_size) (const struct spa_handle_factory *factory, const struct spa_dict *params)

Get the size of handles from this factory.

Parameters

  factory | a spa_handle_factory
  params | extra parameters that determine the size of the handle.

## ◆ init

int(* spa_handle_factory::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.

The caller should allocate memory at least size bytes and pass this as handle.

support can optionally contain extra interfaces or data items that the plugin can use such as a logger.

Parameters

  factory | a spa_handle_factory
  handle | a pointer to memory
  info | extra handle specific information, usually obtained from a spa_device. This can be used to configure the handle.
  support | support items
  n_support | number of elements in support

Returns
  0 on success < 0 errno type error

## ◆ enum_interface_info

int(* spa_handle_factory::enum_interface_info) (const struct spa_handle_factory *factory, const struct spa_interface_info **info, uint32_t *index)

spa_handle_factory::enum_interface_info:

Parameters

  factory | a spa_handle_factory
  info | result to hold spa_interface_info.
  index | index to keep track of the enumeration, 0 for first item

Enumerate the interface information for factory.

Returns
  1 when an item is available 0 when no more items are available < 0 errno type error

The documentation for this struct was generated from the following file:

- plugin.h