PipeWire: pw_client_node_events Struct Reference

PipeWire 1.6.8

Loading...
Searching...
No Matches
pw_client_node_events Struct Reference
Extensions » Client Node

Client Node events More...

`#include <pipewire/extensions/client-node.h>`

## Data Fields
uint32_t | version
int(* | transport )(void *data, int readfd, int writefd, uint32_t mem_id, uint32_t offset, uint32_t size)
| Notify of a new transport area.
int(* | set_param )(void *data, uint32_t id, uint32_t flags, const struct spa_pod *param)
| Notify of a property change.
int(* | set_io )(void *data, uint32_t id, uint32_t mem_id, uint32_t offset, uint32_t size)
| Configure an IO area for the client.
int(* | event )(void *data, const struct spa_event *event)
| Receive an event from the client node.
int(* | command )(void *data, const struct spa_command *command)
| Notify of a new node command.
int(* | add_port )(void *data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props)
| A new port was added to the node.
int(* | remove_port )(void *data, enum spa_direction direction, uint32_t port_id)
| A port was removed from the node.
int(* | port_set_param )(void *data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param)
| A parameter was configured on the port.
int(* | port_use_buffers )(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t flags, uint32_t n_buffers, struct pw_client_node_buffer *buffers)
| Notify the port of buffers.
int(* | port_set_io )(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t id, uint32_t mem_id, uint32_t offset, uint32_t size)
| Configure the io area with id of port_id.
int(* | set_activation )(void *data, uint32_t node_id, int signalfd, uint32_t mem_id, uint32_t offset, uint32_t size)
| Notify the activation record of the next node to trigger.
int(* | port_set_mix_info )(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t peer_id, const struct spa_dict *props)
| Notify about the peer of mix_id.

## Detailed Description

Client Node events

## Field Documentation

## ◆ version

uint32_t pw_client_node_events::version

## ◆ transport

int(* pw_client_node_events::transport) (void *data, int readfd, int writefd, uint32_t mem_id, uint32_t offset, uint32_t size)

Notify of a new transport area.

The transport area is used to signal the client and the server.

Parameters

  readfd | fd for signal data can be read
  writefd | fd for signal data can be written
  mem_id | id for activation memory
  offset | offset of activation memory
  size | size of activation memory

## ◆ set_param

int(* pw_client_node_events::set_param) (void *data, uint32_t id, uint32_t flags, const struct spa_pod *param)

Notify of a property change.

When the server configures the properties on the node this event is sent

Parameters

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

## ◆ set_io

int(* pw_client_node_events::set_io) (void *data, uint32_t id, uint32_t mem_id, uint32_t offset, uint32_t size)

Configure an IO area for the client.

IO areas are identified with an id and are used to exchange state between client and server

Parameters

  id | the id of the io area
  mem_id | the id of the memory to use
  offset | offset of io area in memory
  size | size of the io area

## ◆ event

int(* pw_client_node_events::event) (void *data, const struct spa_event *event)

Receive an event from the client node.

Parameters

  event | the received event

## ◆ command

int(* pw_client_node_events::command) (void *data, const struct spa_command *command)

Notify of a new node command.

Parameters

  command | the command

## ◆ add_port

int(* pw_client_node_events::add_port) (void *data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props)

A new port was added to the node.

The server can at any time add a port to the node when there are free ports available.

Parameters

  direction | the direction of the port
  port_id | the new port id
  props | extra properties

## ◆ remove_port

int(* pw_client_node_events::remove_port) (void *data, enum spa_direction direction, uint32_t port_id)

A port was removed from the node.

Parameters

  direction | a port direction
  port_id | the remove port id

## ◆ port_set_param

int(* pw_client_node_events::port_set_param) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param)

A parameter was configured on the port.

Parameters

  direction | a port direction
  port_id | the port id
  id | the id of the parameter
  flags | flags used when setting the param
  param | the new param

## ◆ port_use_buffers

int(* pw_client_node_events::port_use_buffers) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t flags, uint32_t n_buffers, struct pw_client_node_buffer *buffers)

Notify the port of buffers.

Parameters

  direction | a port direction
  port_id | the port id
  mix_id | the mixer port id
  n_buffer | the number of buffers
  buffers | and array of buffer descriptions

## ◆ port_set_io

int(* pw_client_node_events::port_set_io) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t id, uint32_t mem_id, uint32_t offset, uint32_t size)

Configure the io area with id of port_id.

Parameters

  direction | the direction of the port
  port_id | the port id
  mix_id | the mixer port id
  id | the id of the io area to set
  mem_id | the id of the memory to use
  offset | offset of io area in memory
  size | size of the io area

## ◆ set_activation

int(* pw_client_node_events::set_activation) (void *data, uint32_t node_id, int signalfd, uint32_t mem_id, uint32_t offset, uint32_t size)

Notify the activation record of the next node to trigger.

Parameters

  node_id | the peer node id
  signalfd | the fd to wake up the peer
  mem_id | the mem id of the memory
  the | offset in mem_id to map
  the | size of mem_id to map

## ◆ port_set_mix_info

int(* pw_client_node_events::port_set_mix_info) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t peer_id, const struct spa_dict *props)

Notify about the peer of mix_id.

Parameters

  direction | the direction of the port
  port_id | the port id
  mix_id | the mix id
  peer_id | the id of the peer port
  props | extra properties

Since version 4:1

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

- pipewire/extensions/client-node.h