pub struct Audio(pub Encoder);Tuple Fields§
§0: Encoder实现§
源代码§impl Audio
impl Audio
pub fn open(self) -> Result<Encoder, Error>
pub fn open_as<E: Encoder>(self, codec: E) -> Result<Encoder, Error>
pub fn open_with(self, options: Dictionary<'_>) -> Result<Encoder, Error>
pub fn open_as_with<E: Encoder>( self, codec: E, options: Dictionary<'_>, ) -> Result<Encoder, Error>
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 channels(&self) -> u16
Methods from Deref<Target = Super>§
pub fn send_frame(&mut self, frame: &Frame) -> Result<(), Error>
源代码pub 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.