#[non_exhaustive]pub enum CodecParameters {
Audio(AudioCodecParameters),
Video(VideoCodecParameters),
Subtitle(SubtitleCodecParameters),
}Expand description
Generic wrapper around type-specific codec parameters.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Audio(AudioCodecParameters)
Codec parameters for an audio codec.
Video(VideoCodecParameters)
Codec parameters for a video codec.
Subtitle(SubtitleCodecParameters)
Codec parameters for a subtitle codec.
Implementations§
Source§impl CodecParameters
impl CodecParameters
Sourcepub fn audio(&self) -> Option<&AudioCodecParameters>
pub fn audio(&self) -> Option<&AudioCodecParameters>
If the codec parameters are for an audio codec, returns an immutable reference to the
contained audio codec parameters. Otherwise, returns None.
Sourcepub fn audio_mut(&mut self) -> Option<&mut AudioCodecParameters>
pub fn audio_mut(&mut self) -> Option<&mut AudioCodecParameters>
If the codec parameters are for an audio codec, returns a mutable reference to the
contained audio codec parameters. Otherwise, returns None.
Sourcepub fn video(&self) -> Option<&VideoCodecParameters>
pub fn video(&self) -> Option<&VideoCodecParameters>
If the codec parameters are for an video codec, returns an immutable reference to the
contained video codec parameters. Otherwise, returns None.
Sourcepub fn video_mut(&mut self) -> Option<&mut VideoCodecParameters>
pub fn video_mut(&mut self) -> Option<&mut VideoCodecParameters>
If the codec parameters are for an video codec, returns a mutable reference to the
contained video codec parameters. Otherwise, returns None.
Sourcepub fn is_subtitle(&self) -> bool
pub fn is_subtitle(&self) -> bool
Returns true if the codec parameters are for an subtitle codec.
Sourcepub fn subtitle(&self) -> Option<&SubtitleCodecParameters>
pub fn subtitle(&self) -> Option<&SubtitleCodecParameters>
If the codec parameters are for an subtitle codec, returns an immutable reference to the
contained subtitle codec parameters. Otherwise, returns None.
Sourcepub fn subtitle_mut(&mut self) -> Option<&mut SubtitleCodecParameters>
pub fn subtitle_mut(&mut self) -> Option<&mut SubtitleCodecParameters>
If the codec parameters are for an subtitle codec, returns a mutable reference to the
contained subtitle codec parameters. Otherwise, returns None.
Trait Implementations§
Source§impl Clone for CodecParameters
impl Clone for CodecParameters
Source§fn clone(&self) -> CodecParameters
fn clone(&self) -> CodecParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more