#[non_exhaustive]pub enum CodecConfig {
H264(H264Config),
H265(H265Config),
}Expand description
Complete parameter-set configuration for an encoded stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
H264(H264Config)
H.264 SPS and PPS configuration.
H265(H265Config)
H.265 VPS, SPS and PPS configuration.
Implementations§
Source§impl CodecConfig
impl CodecConfig
Sourcepub const fn codec(&self) -> VideoCodec
pub const fn codec(&self) -> VideoCodec
Codec described by this configuration.
Sourcepub fn to_annex_b(&self) -> Vec<u8> ⓘ
pub fn to_annex_b(&self) -> Vec<u8> ⓘ
Serialize the parameter sets as a standalone Annex-B byte stream.
This is useful when a platform decoder or recorder needs in-band configuration before the first random-access picture.
Sourcepub fn stream_info(&self) -> Result<CodecStreamInfo, VideoError>
pub fn stream_info(&self) -> Result<CodecStreamInfo, VideoError>
Parse coded/visible dimensions, bit depth, and the codec identifier.
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
impl Eq for CodecConfig
Source§impl PartialEq for CodecConfig
impl PartialEq for CodecConfig
impl StructuralPartialEq 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