pub struct OggVorbisEncoderParams {
pub mode: OggVorbisMode,
pub channels: u16,
pub sample_rate: u32,
pub stream_serial: Option<i32>,
pub bitrate: Option<OggVorbisBitrateStrategy>,
pub minimum_page_data_size: Option<u16>,
}
Expand description
- OggVorbis encoder parameters, NOTE: Most of the comments or documents were copied from
vorbis_rs
Fields§
§mode: OggVorbisMode
OggVorbis encoder mode
channels: u16
Num channels
sample_rate: u32
Sample rate
stream_serial: Option<i32>
The serials for the generated OggVorbis streams will be randomly generated, as dictated by the Ogg specification. If this behavior is not desirable, set this field to Some(your_serial_number)
.
bitrate: Option<OggVorbisBitrateStrategy>
OggVorbis bitrate strategy represents a bitrate management strategy that a OggVorbis encoder can use.
minimum_page_data_size: Option<u16>
- Specifies the minimum size of OggVorbis stream data to put into each Ogg page, except for some header pages,
- which have to be cut short to conform to the OggVorbis specification.
- This value controls the tradeoff between Ogg encapsulation overhead and ease of seeking and packet loss concealment.
- By default, it is set to None, which lets the encoder decide.
Implementations§
Source§impl OggVorbisEncoderParams
impl OggVorbisEncoderParams
pub fn create_vorbis_builder<W>(
&self,
writer: W,
) -> Result<VorbisEncoderBuilder<W>, AudioWriteError>where
W: Write,
pub fn get_bitrate(&self) -> u32
Trait Implementations§
Source§impl Clone for OggVorbisEncoderParams
impl Clone for OggVorbisEncoderParams
Source§fn clone(&self) -> OggVorbisEncoderParams
fn clone(&self) -> OggVorbisEncoderParams
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OggVorbisEncoderParams
impl Debug for OggVorbisEncoderParams
Source§impl Default for OggVorbisEncoderParams
impl Default for OggVorbisEncoderParams
Source§fn default() -> OggVorbisEncoderParams
fn default() -> OggVorbisEncoderParams
Returns the “default value” for a type. Read more
Source§impl PartialEq for OggVorbisEncoderParams
impl PartialEq for OggVorbisEncoderParams
impl Copy for OggVorbisEncoderParams
impl StructuralPartialEq for OggVorbisEncoderParams
Auto Trait Implementations§
impl Freeze for OggVorbisEncoderParams
impl RefUnwindSafe for OggVorbisEncoderParams
impl Send for OggVorbisEncoderParams
impl Sync for OggVorbisEncoderParams
impl Unpin for OggVorbisEncoderParams
impl UnwindSafe for OggVorbisEncoderParams
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