pub struct Encoder(pub Audio);
Tuple Fields
0: Audio
Implementations
sourceimpl Encoder
impl Encoder
pub fn encode<P: Mut>(
&mut self,
frame: &Audio,
out: &mut P
) -> Result<bool, Error>
👎 Deprecated since 4.4.0:
Underlying API avcodec_encode_audio2 has been deprecated since FFmpeg 3.1; consider switching to send_frame() and receive_packet()
pub fn flush<P: Mut>(&mut self, out: &mut P) -> Result<bool, Error>
👎 Deprecated since 4.4.0:
Underlying API avcodec_encode_audio2 has been deprecated since FFmpeg 3.1; consider switching to send_eof() and receive_packet()
pub fn frame_size(&self) -> u32
Methods from Deref<Target = Audio>
pub fn set_rate(&mut self, rate: i32)
pub fn rate(&self) -> u32
pub fn set_format(&mut self, value: Sample)
pub fn format(&self) -> Sample
pub fn set_channel_layout(&mut self, value: ChannelLayout)
pub fn channel_layout(&self) -> ChannelLayout
pub fn set_channels(&mut self, value: i32)
pub fn channels(&self) -> u16
Methods from Deref<Target = Super>
pub fn send_frame(&mut self, frame: &Frame) -> Result<(), Error>
sourcepub fn send_eof(&mut self) -> Result<(), Error>
pub fn send_eof(&mut self) -> Result<(), Error>
Sends a NULL packet to the encoder to signal end of stream and enter draining mode.
pub fn receive_packet<P: Mut>(&mut self, packet: &mut P) -> Result<(), Error>
pub fn set_bit_rate(&mut self, value: usize)
pub fn set_max_bit_rate(&mut self, value: usize)
pub fn set_tolerance(&mut self, value: usize)
pub fn set_quality(&mut self, value: usize)
pub fn set_compression(&mut self, value: Option<usize>)
pub fn set_time_base<R: Into<Rational>>(&mut self, value: R)
pub fn set_frame_rate<R: Into<Rational>>(&mut self, value: Option<R>)
Methods from Deref<Target = Context>
pub unsafe fn as_ptr(&self) -> *const AVCodecContext
pub unsafe fn as_mut_ptr(&mut self) -> *mut AVCodecContext
pub fn codec(&self) -> Option<Codec>
pub fn medium(&self) -> Type
pub fn set_flags(&mut self, value: Flags)
pub fn id(&self) -> Id
pub fn compliance(&mut self, value: Compliance)
pub fn debug(&mut self, value: Debug)
pub fn set_threading(&mut self, config: Config)
pub fn threading(&self) -> Config
pub fn set_parameters<P: Into<Parameters>>(
&mut self,
parameters: P
) -> Result<(), Error>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Encoder
impl Send for Encoder
impl !Sync for Encoder
impl Unpin for Encoder
impl !UnwindSafe for Encoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more