PipeWire  0.3.45
spa_io_buffers Struct Reference

IO area to exchange buffers. More...

Data Fields

int32_t status
 the status code More...
 
uint32_t buffer_id
 a buffer id More...
 

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

Field Documentation

◆ status

int32_t spa_io_buffers::status

◆ buffer_id

uint32_t spa_io_buffers::buffer_id

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