pub enum Media {
Aaf(Layout),
Am824(Layout),
Crf(Layout),
}Expand description
How a stream format packs its samples, or its clock.
Variants§
Implementations§
Source§impl Media
impl Media
Sourcepub fn of(format: StreamFormat) -> Option<Self>
pub fn of(format: StreamFormat) -> Option<Self>
The media of format, when this crate can send and receive it.
Sourcepub fn sample_rate(&self) -> u32
pub fn sample_rate(&self) -> u32
Its sampling rate; a media clock’s base frequency.
Sourcepub fn samples_per_frame(&self) -> u16
pub fn samples_per_frame(&self) -> u16
The samples each frame carries; none for a media clock.
Sourcepub fn frame_samples_at(&self, rate: u32) -> Option<u64>
pub fn frame_samples_at(&self, rate: u32) -> Option<u64>
How many samples at rate each frame spans: an audio stream’s own
at its rate alone; a media clock’s events counted at rate, where
they come to whole samples.
Sourcepub fn pdu_length(&self) -> usize
pub fn pdu_length(&self) -> usize
The AVTPDU’s octets, 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 Media
impl Eq for Media
impl StructuralPartialEq for Media
Auto Trait Implementations§
impl Forget for Media
impl Freeze for Media
impl Move for Media
impl RefUnwindSafe for Media
impl Send for Media
impl Sync for Media
impl Unpin for Media
impl UnsafeUnpin for Media
impl UnwindSafe for Media
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