Trait Frame

Source
pub trait Frame: DataFrame {
Show 14 methods // Required methods fn timestamp(&self) -> u64; fn codec(&self) -> Fourcc; fn flags(&self) -> FrameFlags; // Provided methods fn has_flag(&self, flag: FrameFlags) -> bool { ... } fn is_keyframe(&self) -> bool { ... } fn is_live(&self) -> bool { ... } fn is_multichannel(&self) -> bool { ... } fn is_encoded(&self) -> bool { ... } fn is_last(&self) -> bool { ... } fn has_params(&self) -> bool { ... } fn has_start_timestamp(&self) -> bool { ... } fn is_audio(&self) -> bool { ... } fn is_video(&self) -> bool { ... } fn is_metadata(&self) -> bool { ... }
}
Expand description

Frame of the data (related to some timestamp, codec and with some flags)

Required Methods§

Source

fn timestamp(&self) -> u64

Timestamp in microseconds when frame should appear from start

Source

fn codec(&self) -> Fourcc

Fourcc signature of the payload type

Source

fn flags(&self) -> FrameFlags

Frame Flags (keyframe, last, multitrack, live etc.)

Provided Methods§

Source

fn has_flag(&self, flag: FrameFlags) -> bool

Check the flag presence

Source

fn is_keyframe(&self) -> bool

true if frame is IDR (not depends on other frames)

Source

fn is_live(&self) -> bool

true if frame is compressed

Source

fn is_multichannel(&self) -> bool

true if frame is part of multichannel translation

Source

fn is_encoded(&self) -> bool

true if frame is compressed

Source

fn is_last(&self) -> bool

true if frame is last one in the seq

Source

fn has_params(&self) -> bool

frame needs updated decoding params

Source

fn has_start_timestamp(&self) -> bool

live stream has timestamp of starting of the translation

Source

fn is_audio(&self) -> bool

Audio Frame

Source

fn is_video(&self) -> bool

Video Frame

Source

fn is_metadata(&self) -> bool

Metadata Frame

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.

Implementors§