pub struct Layout {
pub nsr: u8,
pub sample_rate: u32,
pub sample_format: u8,
pub bit_depth: u8,
pub channels: u16,
pub samples_per_frame: u16,
}Expand description
What an AAF stream carries, from its stream format.
Fields§
§nsr: u8§sample_rate: u32§sample_format: u8§bit_depth: u8§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 AAF stream format, when it is one this crate can send and receive: 16, 24 or 32-bit integers or 32-bit floats.
Sourcepub fn sample_octets(&self) -> usize
pub fn sample_octets(&self) -> usize
Octets of one sample.
Sourcepub fn data_length(&self) -> usize
pub fn data_length(&self) -> usize
Octets of samples in each frame.
Sourcepub fn pdu_length(&self) -> usize
pub fn pdu_length(&self) -> usize
The AVTPDU’s octets: header and samples, as MSRP’s MaxFrameSize counts them.
Sourcepub fn interval_nanos(&self) -> u64
pub fn interval_nanos(&self) -> u64
How often a frame goes out, in nanoseconds.
Trait Implementations§
impl Copy for Layout
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze 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