pub struct OpusHeader {
pub version: u8,
pub channels: ChannelMapping,
pub pre_skip: u16,
pub sample_rate: u32,
pub output_gain: u16,
}Expand description
Opus header data.
Fields§
§version: u8Opus version.
channels: ChannelMappingChannel mapping.
pre_skip: u16The number of samples to skip in the beginning of the stream.
sample_rate: u32Sample rate used for the original audio.
output_gain: u16Output gain.
Implementations§
Source§impl OpusHeader
impl OpusHeader
Sourcepub fn parse(input: &[u8]) -> Result<'_, Self>
pub fn parse(input: &[u8]) -> Result<'_, Self>
Parse opus header from input data.
May return UnsupportedStream if family255 feature has
not been enabled and such stream is encountered.
Trait Implementations§
Source§impl Debug for OpusHeader
impl Debug for OpusHeader
Source§impl PartialEq for OpusHeader
impl PartialEq for OpusHeader
Source§fn eq(&self, other: &OpusHeader) -> bool
fn eq(&self, other: &OpusHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OpusHeader
Auto Trait Implementations§
impl Freeze for OpusHeader
impl RefUnwindSafe for OpusHeader
impl Send for OpusHeader
impl Sync for OpusHeader
impl Unpin for OpusHeader
impl UnsafeUnpin for OpusHeader
impl UnwindSafe for OpusHeader
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