pub struct Frame {
pub timestamp_us: u64,
pub data: Bytes,
}Expand description
One unit of audio passed across the codec boundary.
Just a payload and a presentation timestamp. PCM layout (format / sample rate / channel count) is fixed by the producer or consumer at construction time, never per frame, so callers can’t accidentally drift the format mid-stream.
Fields§
§timestamp_us: u64Presentation timestamp of the first sample, in microseconds.
data: BytesEncoded packet (post-Encoder) or raw PCM bytes (post-Decoder).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more