PipeWire: pw_device_methods Struct Reference

PipeWire 1.0.3

Loading...
Searching...
No Matches
Data Fields
pw_device_methods Struct Reference
Core API » Device

Device methods. More...

`#include <pipewire/device.h>`

## Data Fields
uint32_t | version
int(* | add_listener )(void *object, struct spa_hook *listener, const struct pw_device_events *events, void *data)
int(* | subscribe_params )(void *object, uint32_t *ids, uint32_t n_ids)
| Subscribe to parameter changes.
int(* | enum_params )(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
| Enumerate device parameters.
int(* | set_param )(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
| Set a parameter on the device.

## Detailed Description

Device methods.

## Field Documentation

## ◆ version

uint32_t pw_device_methods::version

## ◆ add_listener

int(* pw_device_methods::add_listener) (void *object, struct spa_hook *listener, const struct pw_device_events *events, void *data)

## ◆ subscribe_params

int(* pw_device_methods::subscribe_params) (void *object, uint32_t *ids, uint32_t n_ids)

Subscribe to parameter changes.

Automatically emit param events for the given ids when they are changed.

Parameters

  ids | an array of param ids
  n_ids | the number of ids in ids

This requires X permissions on the device.

## ◆ enum_params

int(* pw_device_methods::enum_params) (void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)

Enumerate device parameters.

Start enumeration of device parameters. For each param, a param event will be emitted.

Parameters

  seq | a sequence number to place in the reply
  id | the parameter id to enum or PW_ID_ANY for all
  start | the start index or 0 for the first param
  num | the maximum number of params to retrieve
  filter | a param filter or NULL

This requires X permissions on the device.

## ◆ set_param

int(* pw_device_methods::set_param) (void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)

Set a parameter on the device.

Parameters

  id | the parameter id to set
  flags | extra parameter flags
  param | the parameter to set

This requires W and X permissions on the device.

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

- pipewire/device.h