pub struct TimestampValidator { /* private fields */ }
Implementations§
Source§impl TimestampValidator
impl TimestampValidator
Sourcepub fn new(
frame_length: usize,
pcm_frame_size: usize,
timestamp_generator: Option<TimestampGenerator>,
audio_stream: &impl ElementaryStream,
) -> Self
pub fn new( frame_length: usize, pcm_frame_size: usize, timestamp_generator: Option<TimestampGenerator>, audio_stream: &impl ElementaryStream, ) -> Self
Given frame_length
, the input size of encoded output packets in terms of PCM input frames,
and the input stream, creates a validator that knows what timestamps to expect on each
encoded output packet.
pub fn expected_timestamp(&self, output_packet_index: usize) -> Option<u64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimestampValidator
impl RefUnwindSafe for TimestampValidator
impl Send for TimestampValidator
impl Sync for TimestampValidator
impl Unpin for TimestampValidator
impl UnwindSafe for TimestampValidator
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
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