PipeWire 1.2.5
Loading...
Searching...
No Matches
spa_io_position Struct Reference

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

#include <spa/node/io.h>

Data Fields

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

Detailed Description

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

It is set on all nodes in SPA_IO_Position, and the contents of spa_io_position::clock contain the clock updates made by the driving node in the graph in its SPA_IO_Clock. Also, spa_io_position.clock.id will contain the clock id of the driving node in the graph.

The position clock indicates the logical start time of the current graph cycle.

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, midi-src.c, spa/examples/adapter-control.c, video-dsp-play.c, video-dsp-src.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, audio-dsp-src.c, and midi-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: