Skip to main content

LayerFrame

Struct LayerFrame 

Source
pub struct LayerFrame {
Show 13 fields pub spatial_id: u8, pub temporal_id: u8, pub key_picture: bool, pub key_frame: bool, pub temporal_reference: Option<u8>, pub inter_layer_dependency: bool, pub referenced_by_upper_layers: bool, pub discardable: bool, pub layer_sync: bool, pub fdiffs: Vec<u16>, pub dtis: Vec<DecodeTargetIndication>, pub chain_fdiffs: Vec<u8>, pub end_of_picture: bool,
}
Expand description

One frame of a picture of a ScalabilityPattern: one spatial layer’s frame, with what it depends on and how it relates to each decode target.

Fields§

§spatial_id: u8

The frame’s spatial layer.

§temporal_id: u8

The frame’s temporal layer.

§key_picture: bool

The frame is of a key picture: the picture a coded video sequence starts with.

§key_frame: bool

The frame depends on no other frame: a key frame.

§temporal_reference: Option<u8>

How many pictures back the frame of the same spatial layer this one predicts from is; None when it predicts from no earlier picture.

§inter_layer_dependency: bool

The frame predicts from the frame of the spatial layer below in the same picture.

§referenced_by_upper_layers: bool

A frame of a spatial layer above, in this picture or a later one, depends on this frame.

§discardable: bool

No other frame depends on this one.

§layer_sync: bool

The frame depends on frames of temporal layer 0 only (and is not of that layer): a receiver can start its temporal layer here (VP8’s layer sync).

§fdiffs: Vec<u16>

How many frames back, in the order the pattern gives them, each frame this one depends on is: the Dependency Descriptor’s frame differences.

§dtis: Vec<DecodeTargetIndication>

The frame’s indication for each decode target (see ScalabilityPattern::decode_target_layers for their order).

§chain_fdiffs: Vec<u8>

For each chain (one per spatial layer), how many frames back the previous frame of the chain is; 0 when there is none.

§end_of_picture: bool

The frame is its picture’s last.

Implementations§

Source§

impl LayerFrame

Source

pub fn starts_coded_video_sequence(&self) -> bool

Whether the frame starts a coded video sequence: the first frame of a key picture. Its first packet carries the Dependency Descriptor’s structure, and VP9’s scalability structure.

Source

pub fn dependencies(&self) -> FrameDependencyTemplate

The frame as the Dependency Descriptor describes it, for DependencyDescriptorWriter::next_frame.

Source

pub fn vp8_info(&self, mode: ScalabilityMode) -> Vp8FrameInfo

The frame as the VP8 payload descriptor describes it (RFC 7741 section 4.2), for Vp8Payloader::payload_frame. VP8 has temporal layers only; mode says whether there is more than one.

Source

pub fn vp9_info(&self) -> Vp9FrameInfo

The frame as the VP9 payload descriptor describes it (RFC 9628 section 4.2), for Vp9Payloader::payload_layer_frame. The pattern is the authority on the frame’s dependencies, so they are stated rather than left to the frame’s header (which an end-to-end encrypted frame hides).

Trait Implementations§

Source§

impl Clone for LayerFrame

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LayerFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for LayerFrame

Source§

impl PartialEq for LayerFrame

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayerFrame

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.