Skip to main content

avb_stream/
lib.rs

1//! AVTP audio streams for talker and listener entities: AAF and
2//! AM824 frames built and read (IEEE 1722-2016, 7 and 6.4), sent paced on
3//! gPTP time and received into a buffer the audio device plays, with
4//! audio from and to the computer's devices through cpal, a test tone or
5//! nothing; and media clock streams, CRF (10), on the same time.
6//!
7//! The media clock is gPTP's: a talker sends its samples at the nominal
8//! rate of gPTP time, as gptpd gives it for the interface, and
9//! the audio device, on its own clock, is kept in step by resampling
10//! between the two, the ratio steered by the fill of a buffer between
11//! them.
12//!
13//! With `AVB_STREAM_TIMING` naming a file, each talker's thread writes
14//! there a line a second: how late it woke for its frames, how often it
15//! was already behind, how long building and sending them took, how late
16//! each was handed over against its departure, and how many it left out
17//! as too late, counted by the thread itself and written by one of
18//! ordinary priority. Without it, the thread keeps no time of its own.
19
20pub mod aaf;
21pub mod am824;
22pub mod audio;
23pub mod clock;
24pub mod crf;
25pub mod formats;
26pub mod listener;
27mod lock;
28pub mod media;
29mod meter;
30pub mod realtime;
31pub mod recovered;
32pub mod talker;
33mod timing;
34
35pub use clock::MediaClock;
36pub use listener::{GroupListener, Listener, ListenerConfig, ListenerGroup, ListenerStats};
37pub use recovered::RecoveredClock;
38pub use talker::{
39    GroupConfig, GroupStream, GroupTalker, Talker, TalkerConfig, TalkerGroup, TalkerStats,
40};