PipeWire 1.6.5

Loading...
Searching...
No Matches
spa_io_buffers Struct Reference
SPA » Node

IO area to exchange buffers. More...

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

## Data Fields
int32_t | status
| the status code
uint32_t | buffer_id
| a buffer id

## Detailed Description

IO area to exchange buffers.

A set of buffers should first be configured on the node/port. Further references to those buffers will be made by using the id of the buffer.

If status is SPA_STATUS_OK, the host should ignore the io area.

If status is SPA_STATUS_NEED_DATA, the host should: 1) recycle the buffer in buffer_id, if possible 2) prepare a new buffer and place the id in buffer_id.

If status is SPA_STATUS_HAVE_DATA, the host should consume the buffer in buffer_id and set the state to SPA_STATUS_NEED_DATA when new data is requested.

If status is SPA_STATUS_STOPPED, some error occurred on the port.

If status is SPA_STATUS_DRAINED, data from the io area was used to drain.

Status can also be a negative errno value to indicate errors. such as: -EINVAL: buffer_id is invalid -EPIPE: no more buffers available

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

## ◆ status

int32_t spa_io_buffers::status

the status code

Examples
  export-source.c, local-v4l2.c, spa/examples/local-libcamera.c, spa/examples/local-v4l2.c, and spa/examples/local-videotestsrc.c.

## ◆ buffer_id

uint32_t spa_io_buffers::buffer_id

a buffer id

Examples
  export-source.c, local-v4l2.c, spa/examples/local-libcamera.c, spa/examples/local-v4l2.c, and spa/examples/local-videotestsrc.c.

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

- spa/node/io.h