#[non_exhaustive]pub struct VideoPacketConfig { /* private fields */ }Expand description
Per-stream video configuration delivered via on_stream_info —
everything a WebCodecs VideoDecoder / fMP4 packager needs, precomputed.
Implementations§
Source§impl VideoPacketConfig
impl VideoPacketConfig
Sourcepub fn stream_index(&self) -> usize
pub fn stream_index(&self) -> usize
Output stream index; matches PacketView::stream_index.
Sourcepub fn codec_string(&self) -> &str
pub fn codec_string(&self) -> &str
RFC 6381 codec string ("avc1.PPCCLL"), suitable as the WebCodecs
codec value.
Sourcepub fn profile(&self) -> u8
pub fn profile(&self) -> u8
H.264 profile_idc (the avcC AVCProfileIndication; e.g. 66 =
Baseline, 77 = Main, 100 = High). Same source as
codec_string.
Sourcepub fn compatibility(&self) -> u8
pub fn compatibility(&self) -> u8
The avcC profile_compatibility byte (constraint-set flags).
Sourcepub fn level(&self) -> u8
pub fn level(&self) -> u8
H.264 level_idc (the avcC AVCLevelIndication; e.g. 30 = level
3.0, 0x1F = level 3.1).
Sourcepub fn codec_config(&self) -> &[u8] ⓘ
pub fn codec_config(&self) -> &[u8] ⓘ
The AVCDecoderConfigurationRecord (avcC), suitable as the WebCodecs
description.
Sourcepub fn extradata(&self) -> &[u8] ⓘ
pub fn extradata(&self) -> &[u8] ⓘ
FFmpeg-oriented alias of codec_config.
Sourcepub fn time_base(&self) -> AVRational
pub fn time_base(&self) -> AVRational
Time base every timestamp of this stream is expressed in (the encoder time base, passed through verbatim).
Sourcepub fn sample_aspect_ratio(&self) -> Option<AVRational>
pub fn sample_aspect_ratio(&self) -> Option<AVRational>
Sample aspect ratio, when known.
Sourcepub fn frame_rate(&self) -> Option<AVRational>
pub fn frame_rate(&self) -> Option<AVRational>
Nominal frame rate. None when the pipeline did not pin one (VFR
sources, and CFR jobs without an explicit output rate).
Trait Implementations§
Source§impl Clone for VideoPacketConfig
impl Clone for VideoPacketConfig
Source§fn clone(&self) -> VideoPacketConfig
fn clone(&self) -> VideoPacketConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more