PipeWire 0.3.65
spa_node_callbacks Struct Reference

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, and spa/examples/local-v4l2.c.

Field Documentation

◆ version

uint32_t spa_node_callbacks::version

◆ ready

int(* spa_node_callbacks::ready) (void *data, int state)
Parameters
nodea 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
nodea spa_node
port_idan input port_id
buffer_idthe 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
datauser data
triggerthe timestamp in microseconds when the xrun happened
delaythe amount of microseconds of xrun.
infoan 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: