pub struct CodecParams {
pub width: Option<u32>,
pub height: Option<u32>,
pub sample_rate: Option<u32>,
pub channels: Option<u8>,
pub extradata: Option<Bytes>,
pub block_addition_mappings: Vec<BlockAdditionMapping>,
}Expand description
Codec-specific parameters.
Contains format-specific information needed for decoding, such as video dimensions or audio sample rate.
Fields§
§width: Option<u32>Video width in pixels.
height: Option<u32>Video height in pixels.
sample_rate: Option<u32>Audio sample rate in Hz.
channels: Option<u8>Number of audio channels.
extradata: Option<Bytes>Codec-specific extra data (e.g., SPS/PPS for video, codec headers).
block_addition_mappings: Vec<BlockAdditionMapping>Matroska BlockAdditionMapping metadata for this stream, if any.
Implementations§
Source§impl CodecParams
impl CodecParams
Sourcepub fn with_extradata(self, extradata: Bytes) -> Self
pub fn with_extradata(self, extradata: Bytes) -> Self
Sets the extradata.
Sourcepub const fn has_video_params(&self) -> bool
pub const fn has_video_params(&self) -> bool
Returns true if video dimensions are set.
Sourcepub const fn has_audio_params(&self) -> bool
pub const fn has_audio_params(&self) -> bool
Returns true if audio parameters are set.
Trait Implementations§
Source§impl Clone for CodecParams
impl Clone for CodecParams
Source§fn clone(&self) -> CodecParams
fn clone(&self) -> CodecParams
Returns a duplicate 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 CodecParams
impl Debug for CodecParams
Source§impl Default for CodecParams
impl Default for CodecParams
Source§fn default() -> CodecParams
fn default() -> CodecParams
Returns the “default value” for a type. Read more
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