PipeWire  0.3.49
pw_time Struct Reference

A time structure. More...

Data Fields

int64_t now
 the monotonic time in nanoseconds. More...
 
struct spa_fraction rate
 the rate of ticks and delay. More...
 
uint64_t ticks
 the ticks at now. More...
 
int64_t delay
 delay to device. More...
 
uint64_t queued
 data queued in the stream, this is the sum of the size fields in the pw_buffer that are currently queued and, for audio streams, the extra data queued in the resampler. More...
 

Detailed Description

A time structure.

Field Documentation

◆ now

int64_t pw_time::now

the monotonic time in nanoseconds.

This is the time when this time report was updated. It is usually updated every graph cycle. You can use the current monotonic time to calculate the elapsed time between this report and the current state and calculate updated ticks and delay values.

◆ rate

struct spa_fraction pw_time::rate

the rate of ticks and delay.

This is usually expressed in 1/<samplerate>.

◆ ticks

uint64_t pw_time::ticks

the ticks at now.

This is the current time that the remote end is reading/writing.

◆ delay

int64_t pw_time::delay

delay to device.

This is the time it will take for the next sample in the stream to be presented by the playback device or the time a sample traveled from the capture device. This delay includes the delay introduced by all filters on the path between the stream and the device. The delay is normally constant in a graph and can change when the topology of the graph or the quantum changes.

◆ queued

uint64_t pw_time::queued

data queued in the stream, this is the sum of the size fields in the pw_buffer that are currently queued and, for audio streams, the extra data queued in the resampler.

For audio streams, it is thus highly recommended to use the buffer size field as the sample count in the buffer.


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