moq_audio/frame.rs
1use bytes::Bytes;
2
3/// One unit of audio passed across the codec boundary.
4///
5/// Just a payload and a presentation timestamp. PCM layout (format /
6/// sample rate / channel count) is fixed by the producer or consumer
7/// at construction time, never per frame, so callers can't accidentally
8/// drift the format mid-stream.
9#[derive(Clone, Debug)]
10pub struct Frame {
11 /// Presentation timestamp of the first sample, in microseconds.
12 pub timestamp_us: u64,
13 /// Encoded packet (post-Encoder) or raw PCM bytes (post-Decoder).
14 pub data: Bytes,
15}