Struct libspa_sys::spa_io_clock
source · #[repr(C)]pub struct spa_io_clock {Show 15 fields
pub flags: u32,
pub id: u32,
pub name: [c_char; 64],
pub nsec: u64,
pub rate: spa_fraction,
pub position: u64,
pub duration: u64,
pub delay: i64,
pub rate_diff: f64,
pub next_nsec: u64,
pub target_rate: spa_fraction,
pub target_duration: u64,
pub target_seq: u32,
pub padding: u32,
pub xrun: u64,
}
Expand description
Absolute time reporting.
Nodes that can report clocking information will receive this io block. The application sets the id. This is usually set as part of the position information but can also be set separately.
The clock counts the elapsed time according to the clock provider since the provider was last started.
Fields§
§flags: u32
< clock flags
id: u32
< unique clock id, set by application
name: [c_char; 64]
< clock name prefixed with API, set by node. The clock name is unique per clock and can be used to check if nodes share the same clock.
nsec: u64
< time in nanoseconds against monotonic clock
rate: spa_fraction
< rate for position/duration/delay/xrun
position: u64
< current position
duration: u64
< duration of current cycle
delay: i64
< delay between position and hardware, positive for capture, negative for playback
rate_diff: f64
< rate difference between clock and monotonic time
next_nsec: u64
< estimated next wakeup time in nanoseconds
target_rate: spa_fraction
< target rate of next cycle
target_duration: u64
< target duration of next cycle
target_seq: u32
< seq counter. must be equal at start and end of read and lower bit must be 0
padding: u32
§xrun: u64
< estimated accumulated xrun duration
Trait Implementations§
source§impl Clone for spa_io_clock
impl Clone for spa_io_clock
source§fn clone(&self) -> spa_io_clock
fn clone(&self) -> spa_io_clock
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for spa_io_clock
impl Debug for spa_io_clock
source§impl PartialEq for spa_io_clock
impl PartialEq for spa_io_clock
source§fn eq(&self, other: &spa_io_clock) -> bool
fn eq(&self, other: &spa_io_clock) -> bool
self
and other
values to be equal, and is used
by ==
.