pub trait Frame {
Show 18 methods
// Required methods
fn dts(&self) -> u64;
fn pts(&self) -> i64;
fn codec(&self) -> Fourcc;
fn flags(&self) -> FrameFlags;
fn track(&self) -> u32;
fn timestamp(&self) -> Option<u64>;
fn params(&self) -> impl Iterator<Item = &[u8]>;
fn units(&self) -> impl Iterator<Item = &[u8]>;
// Provided methods
fn is_keyframe(&self) -> bool { ... }
fn is_multichannel(&self) -> bool { ... }
fn is_compressed(&self) -> bool { ... }
fn is_last(&self) -> bool { ... }
fn has_params(&self) -> bool { ... }
fn has_timestamp(&self) -> bool { ... }
fn is_audio(&self) -> bool { ... }
fn is_video(&self) -> bool { ... }
fn is_metadata(&self) -> bool { ... }
fn units_annexb(&self) -> impl Iterator<Item = &[u8]> { ... }
}
Required Methods§
Sourcefn dts(&self) -> u64
fn dts(&self) -> u64
Decoding timestamp in microseconds (monotonic increasing timestamp starting from 0 (usually) at the first frame)
Sourcefn pts(&self) -> i64
fn pts(&self) -> i64
Presentation timestamp in microseconds - same as DTS, but with frame presentation offset correction
Sourcefn flags(&self) -> FrameFlags
fn flags(&self) -> FrameFlags
Frame Flags (keyframe, last, multitrack, live etc.)
Sourcefn timestamp(&self) -> Option<u64>
fn timestamp(&self) -> Option<u64>
The begging of translation timestamp (unixtimespamp in ms from 01:01:1970)
Provided Methods§
Sourcefn is_keyframe(&self) -> bool
fn is_keyframe(&self) -> bool
true if frame is IDR (not depends on other frames)
Sourcefn is_multichannel(&self) -> bool
fn is_multichannel(&self) -> bool
true if frame is part of multichannel translation
Sourcefn is_compressed(&self) -> bool
fn is_compressed(&self) -> bool
true if frame is compressed
Sourcefn has_params(&self) -> bool
fn has_params(&self) -> bool
frame needs updated decoding params
Sourcefn has_timestamp(&self) -> bool
fn has_timestamp(&self) -> bool
live stream has timestamp of starting of the translation
Sourcefn is_metadata(&self) -> bool
fn is_metadata(&self) -> bool
Metadata Frame
Sourcefn units_annexb(&self) -> impl Iterator<Item = &[u8]>
fn units_annexb(&self) -> impl Iterator<Item = &[u8]>
Iterator by NAL units of the parameters (for h264/h265 - VPS,SPS,PPS), with annexb prefix
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.