PipeWire  0.3.45
spa_io_position Struct Reference

The position information adds extra meaning to the raw clock times. More...

Data Fields

struct spa_io_clock clock
 clock position of driver, always valid and read only More...
 
struct spa_io_video_size video
 size of the video in the current cycle More...
 
int64_t offset
 an offset to subtract from the clock position to get a running time. More...
 
uint32_t state
 one of enum spa_io_position_state More...
 
uint32_t n_segments
 number of segments More...
 
struct spa_io_segment segments [SPA_IO_POSITION_MAX_SEGMENTS]
 segments More...
 

Detailed Description

The position information adds extra meaning to the raw clock times.

It is set on all nodes and the clock id will contain the clock of the driving node in the graph.

The position information contains 1 or more segments that convert the raw clock times to a stream time. They are sorted based on their start times, and thus the order in which they will activate in the future. This makes it possible to look ahead in the scheduled segments and anticipate the changes in the timeline.

Examples
audio-dsp-filter.c, audio-dsp-src.c, video-dsp-play.c, video-play-pull.c, and video-play.c.

Field Documentation

◆ clock

struct spa_io_clock spa_io_position::clock

clock position of driver, always valid and read only

Examples
audio-dsp-filter.c, and audio-dsp-src.c.

◆ video

struct spa_io_video_size spa_io_position::video

size of the video in the current cycle

◆ offset

int64_t spa_io_position::offset

an offset to subtract from the clock position to get a running time.

This is the time that the state has been in the RUNNING state and the time that should be used to compare the segment start values against.

◆ state

uint32_t spa_io_position::state

one of enum spa_io_position_state

◆ n_segments

uint32_t spa_io_position::n_segments

number of segments

◆ segments

struct spa_io_segment spa_io_position::segments[SPA_IO_POSITION_MAX_SEGMENTS]

segments


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