pub struct AacEncoder { /* private fields */ }Expand description
Encodes a stream frame by frame.
Implementations§
Source§impl AacEncoder
impl AacEncoder
pub fn new(cfg: EncoderConfig) -> Result<Self, EncodeError>
Sourcepub fn audio_specific_config(&self) -> [u8; 2]
pub fn audio_specific_config(&self) -> [u8; 2]
The two-byte AudioSpecificConfig for an MP4 esds.
pub fn config(&self) -> &EncoderConfig
Sourcepub fn push(&mut self, planar: &[&[f32]]) -> Result<Vec<Vec<u8>>, EncodeError>
pub fn push(&mut self, planar: &[&[f32]]) -> Result<Vec<Vec<u8>>, EncodeError>
Adds samples (one slice per channel, equal lengths) and returns the raw access units for every frame that is now complete.
Auto Trait Implementations§
impl Forget for AacEncoder
impl Freeze for AacEncoder
impl Move for AacEncoder
impl RefUnwindSafe for AacEncoder
impl Send for AacEncoder
impl Sync for AacEncoder
impl Unpin for AacEncoder
impl UnsafeUnpin for AacEncoder
impl UnwindSafe for AacEncoder
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