pub struct Encoder { /* private fields */ }Implementations§
Source§impl Encoder
impl Encoder
pub fn new(cfg: EncoderConfig) -> Result<Encoder>
pub fn config(&self) -> &EncoderConfig
pub fn pre_skip(&self) -> u16
pub fn head(&self) -> OpusHead
pub fn codec_private(&self) -> Vec<u8> ⓘ
pub fn reset(&mut self)
pub fn final_range(&self) -> u32
pub fn frame_samples(&self) -> usize
pub fn encode(&mut self, audio: &AudioBuffer) -> Result<Vec<Packet>>
pub fn flush(&mut self) -> Result<Vec<Packet>>
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
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> 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