#[non_exhaustive]pub struct CodecConfig {
pub codec: CodecId,
pub private: Option<Arc<[u8]>>,
pub epoch: u32,
pub time_base: TimeBase,
pub video: Option<VideoTrackInfo>,
}Expand description
What a decoder needs before the first packet of a configuration epoch:
derived from a TrackInfo, or from a muxer’s expectations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.codec: CodecIdThe codec.
private: Option<Arc<[u8]>>Codec configuration bytes (av1C, a sequence header, avcC).
epoch: u32The epoch these bytes start.
time_base: TimeBaseThe clock of the timestamps that follow.
video: Option<VideoTrackInfo>Declared video shape, when known.
Implementations§
Source§impl CodecConfig
impl CodecConfig
Sourcepub fn new(codec: CodecId, time_base: TimeBase) -> Self
pub fn new(codec: CodecId, time_base: TimeBase) -> Self
A configuration for codec on time_base, epoch 0.
Sourcepub fn with_video(self, video: VideoTrackInfo) -> Self
pub fn with_video(self, video: VideoTrackInfo) -> Self
The declared video shape.
Sourcepub fn with_private(self, private: Arc<[u8]>) -> Self
pub fn with_private(self, private: Arc<[u8]>) -> Self
Codec configuration bytes.
Sourcepub fn with_epoch(self, epoch: u32) -> Self
pub fn with_epoch(self, epoch: u32) -> Self
The epoch.
Trait Implementations§
Source§impl Clone for CodecConfig
impl Clone for CodecConfig
Source§fn clone(&self) -> CodecConfig
fn clone(&self) -> CodecConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CodecConfig
impl Debug for CodecConfig
Auto Trait Implementations§
impl Freeze for CodecConfig
impl RefUnwindSafe for CodecConfig
impl Send for CodecConfig
impl Sync for CodecConfig
impl Unpin for CodecConfig
impl UnsafeUnpin for CodecConfig
impl UnwindSafe for CodecConfig
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