pub struct CodecParams {
pub codec_id: CodecId,
pub width: u32,
pub height: u32,
pub pixel_format: Option<PixelFormat>,
pub sample_rate: u32,
pub channels: u16,
pub sample_format: Option<SampleFormat>,
pub extradata: Vec<u8>,
}Expand description
Stream parameters handed to a decoder before the first packet. Self-describing codecs (AV1, PNG, …) can ignore these; raw/parametric codecs (PCM, and codecs that carry config out of band like H.264 SPS/PPS) need them.
Fields§
§codec_id: CodecId§width: u32§height: u32§pixel_format: Option<PixelFormat>§sample_rate: u32§channels: u16§sample_format: Option<SampleFormat>§extradata: Vec<u8>Codec-private init data (SPS/PPS, OpusHead, …).
Trait Implementations§
Source§impl Clone for CodecParams
impl Clone for CodecParams
Source§impl Debug for CodecParams
impl Debug for CodecParams
Auto Trait Implementations§
impl Freeze for CodecParams
impl RefUnwindSafe for CodecParams
impl Send for CodecParams
impl Sync for CodecParams
impl Unpin for CodecParams
impl UnsafeUnpin for CodecParams
impl UnwindSafe for CodecParams
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