#[non_exhaustive]pub struct LayerInfo {
pub layer_id: u16,
pub view_id: Option<u16>,
pub depends_on: Vec<u16>,
}Expand description
Stream-level description of one layer of a multi-layer video
stream, carried in
CodecParameters::layers.
#[non_exhaustive]: build it with new and the
with_* builders, read the public fields directly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.layer_id: u16The codec’s layer identifier (the value frames of this layer
report in LayerIdentity::layer_id). 0 is the base layer.
view_id: Option<u16>The view this layer codes, for multi-view content; None when
the layer is not a view (spatial / quality enhancement,
auxiliary pictures) or the mapping is unknown.
depends_on: Vec<u16>Layer identifiers this layer predicts from directly (its
reference layers). Empty for the base layer and for streams
whose dependency structure is not described. A consumer that
wants to decode this layer must also feed every layer reachable
through depends_on.
Implementations§
Source§impl LayerInfo
impl LayerInfo
Sourcepub fn new(layer_id: u16) -> Self
pub fn new(layer_id: u16) -> Self
Description of layer layer_id with no view and no declared
dependencies.
Sourcepub fn with_view_id(self, view_id: u16) -> Self
pub fn with_view_id(self, view_id: u16) -> Self
Builder: set the view identifier.
Sourcepub fn with_depends_on(self, layers: impl Into<Vec<u16>>) -> Self
pub fn with_depends_on(self, layers: impl Into<Vec<u16>>) -> Self
Builder: replace the direct reference-layer list.
Sourcepub fn is_base_layer(&self) -> bool
pub fn is_base_layer(&self) -> bool
true for the base layer (layer_id == 0).
Sourcepub fn identity(&self) -> LayerIdentity
pub fn identity(&self) -> LayerIdentity
The LayerIdentity a frame of this layer would carry
(layer_id and view_id; no access-unit index).