#[non_exhaustive]pub enum PacketStreamInfo {
Video(VideoPacketConfig),
Audio(AudioPacketConfig),
}Expand description
Per-stream configuration delivered once via on_stream_info, typed by
media kind (mirrors the crate’s StreamInfo shape).
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.
Video(VideoPacketConfig)
H.264 stream configuration: avcC record, RFC 6381 codec string, profile/level, dimensions, time base, frame rate.
Audio(AudioPacketConfig)
AAC stream configuration: AudioSpecificConfig, RFC 6381 codec string, time base, sample rate, channel layout.
Implementations§
Source§impl PacketStreamInfo
impl PacketStreamInfo
Sourcepub fn stream_index(&self) -> usize
pub fn stream_index(&self) -> usize
Output stream index; matches PacketView::stream_index.
Sourcepub fn media_type(&self) -> AVMediaType
pub fn media_type(&self) -> AVMediaType
Media type of the stream.
Sourcepub fn codec_string(&self) -> &str
pub fn codec_string(&self) -> &str
RFC 6381 codec string ("avc1.PPCCLL" / "mp4a.40.X").
Sourcepub fn codec_config(&self) -> &[u8] ⓘ
pub fn codec_config(&self) -> &[u8] ⓘ
Codec configuration record (avcC / AudioSpecificConfig).
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.
Sourcepub fn video(&self) -> Option<&VideoPacketConfig>
pub fn video(&self) -> Option<&VideoPacketConfig>
The video configuration, when this is a video stream.
Sourcepub fn audio(&self) -> Option<&AudioPacketConfig>
pub fn audio(&self) -> Option<&AudioPacketConfig>
The audio configuration, when this is an audio stream.
Trait Implementations§
Source§impl Clone for PacketStreamInfo
impl Clone for PacketStreamInfo
Source§fn clone(&self) -> PacketStreamInfo
fn clone(&self) -> PacketStreamInfo
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 moreAuto Trait Implementations§
impl Freeze for PacketStreamInfo
impl RefUnwindSafe for PacketStreamInfo
impl Send for PacketStreamInfo
impl Sync for PacketStreamInfo
impl Unpin for PacketStreamInfo
impl UnsafeUnpin for PacketStreamInfo
impl UnwindSafe for PacketStreamInfo
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