PipeWire: spa_node_callbacks Struct Reference

PipeWire 1.4.2 |

Loading...
Searching...
No Matches
Data Fields
spa_node_callbacks Struct Reference
SPA » Node

Node callbacks. More...

`#include <spa/node/node.h>`

## Data Fields
uint32_t | version
int(* | ready )(void *data, int state)
int(* | reuse_buffer )(void *data, uint32_t port_id, uint32_t buffer_id)
int(* | xrun )(void *data, uint64_t trigger, uint64_t delay, struct spa_pod *info)

## Detailed Description

Node callbacks.

Callbacks are called from the real-time data thread. Only one callback structure can be set on an spa_node.

Examples
  export-sink.c, export-source.c, local-v4l2.c, spa/examples/adapter-control.c, spa/examples/example-control.c, spa/examples/local-libcamera.c, spa/examples/local-v4l2.c, and spa/examples/local-videotestsrc.c.

## Field Documentation

## ◆ version

uint32_t spa_node_callbacks::version

## ◆ ready

int(* spa_node_callbacks::ready) (void *data, int state)

Parameters

  node | a spa_node

The node is ready for processing.

When this function is NULL, synchronous operation is requested on the ports.

## ◆ reuse_buffer

int(* spa_node_callbacks::reuse_buffer) (void *data, uint32_t port_id, uint32_t buffer_id)

Parameters

  node | a spa_node
  port_id | an input port_id
  buffer_id | the buffer id to be reused

The node has a buffer that can be reused.

When this function is NULL, the buffers to reuse will be set in the io area of the input ports.

## ◆ xrun

int(* spa_node_callbacks::xrun) (void *data, uint64_t trigger, uint64_t delay, struct spa_pod *info)

Parameters

  data | user data
  trigger | the timestamp in microseconds when the xrun happened
  delay | the amount of microseconds of xrun.
  info | an object with extra info (NULL for now)

The node has encountered an over or underrun

The info contains an object with more information

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

- spa/node/node.h