pub struct PcmCapture<'a> { /* private fields */ }Expand description
A sole-consumer linear-PCM view of one session’s received audio.
The handle owns its rate-conversion history, so consecutive RTP frames remain one continuous
output stream. Creating one does not spawn work; it reads the same bounded receive queue as
MediaSession::recv.
Implementations§
Source§impl PcmCapture<'_>
impl PcmCapture<'_>
Sourcepub async fn record_at_least(&mut self, samples: usize, within: Duration) -> Pcm
pub async fn record_at_least(&mut self, samples: usize, within: Duration) -> Pcm
Record at least samples in the chosen output format, or until within elapses.
within bounds failure rather than defining stream silence, matching
MediaSession::record_at_least. Whatever arrived before the bound is retained.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PcmCapture<'a>
impl<'a> !RefUnwindSafe for PcmCapture<'a>
impl<'a> Send for PcmCapture<'a>
impl<'a> Sync for PcmCapture<'a>
impl<'a> Unpin for PcmCapture<'a>
impl<'a> UnsafeUnpin for PcmCapture<'a>
impl<'a> !UnwindSafe for PcmCapture<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more