PipeWire: pw_buffer Struct Reference

PipeWire 0.3.51

Data Fields
pw_buffer Struct Reference
Stream

a buffer structure obtained from pw_stream_dequeue_buffer(). More...

`#include <pipewire/stream.h>`

## Data Fields
struct spa_buffer * | buffer
| the spa buffer More...
void * | user_data
| user data attached to the buffer More...
uint64_t | size
| This field is set by the user and the sum of all queued buffer is returned in the time info. More...
uint64_t | requested
| For playback streams, this field contains the suggested amount of data to provide. More...

## Detailed Description

a buffer structure obtained from pw_stream_dequeue_buffer().

The size of this structure can grow as more field are added in the future

Examples
  audio-src.c, tutorial4.c, tutorial5.c, video-dsp-play.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, video-play.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

## Field Documentation

## ◆ buffer

struct spa_buffer* pw_buffer::buffer

the spa buffer

Examples
  audio-src.c, tutorial4.c, tutorial5.c, video-dsp-play.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, video-play.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

## ◆ user_data

void* pw_buffer::user_data

user data attached to the buffer

## ◆ size

uint64_t pw_buffer::size

This field is set by the user and the sum of all queued buffer is returned in the time info.

For audio, it is advised to use the number of samples in the buffer for this field.

## ◆ requested

uint64_t pw_buffer::requested

For playback streams, this field contains the suggested amount of data to provide.

For audio streams this will be the amount of samples required by the resampler. This field is 0 when no suggestion is provided. Since 0.3.49

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

- pipewire/stream.h