pub struct Layout {
pub sfc: u8,
pub sample_rate: u32,
pub channels: u16,
pub samples_per_frame: u16,
}Expand description
What an AM824 stream carries, from its stream format.
Fields§
§sfc: u8§sample_rate: u32§channels: u16§samples_per_frame: u16Implementations§
Source§impl Layout
impl Layout
Sourcepub fn of(format: StreamFormat) -> Option<Self>
pub fn of(format: StreamFormat) -> Option<Self>
The layout of an AM824 stream format, when this crate can send and receive it: non-blocking, every quadlet multi-bit linear audio, at a rate class A’s 8000 frames a second divides.
Sourcepub fn data_length(&self) -> usize
pub fn data_length(&self) -> usize
Octets of data blocks in each frame.
Sourcepub fn pdu_length(&self) -> usize
pub fn pdu_length(&self) -> usize
The AVTPDU’s octets, as MSRP’s MaxFrameSize counts them.
pub fn interval_nanos(&self) -> u64
Sourcepub fn syt_interval(&self) -> u8
pub fn syt_interval(&self) -> u8
Data blocks between the instants SYT, and so the AVTP timestamp, can name (IEC 61883-6, Table 4).
Sourcepub fn stamped_block(&self, dbc: u8) -> Option<u16>
pub fn stamped_block(&self, dbc: u8) -> Option<u16>
Which of a frame’s data blocks its timestamp is for, when the
first is block dbc: the one at an SYT_INTERVAL boundary, if the
frame has one.
Trait Implementations§
impl Copy for Layout
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layout
impl Move for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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