pub struct DependencyDescriptorReader { /* private fields */ }Expand description
The receive side of the Dependency Descriptor: reads the descriptors of one RTP stream, keeping the structure and the active decode targets from packet to packet (AV1 RTP specification A.4, A.8).
Give it the descriptors in RTP sequence number order: “when an update to the set of active decode targets is received it is valid until the next update in RTP packet sequence number order”.
Implementations§
Source§impl DependencyDescriptorReader
impl DependencyDescriptorReader
Sourcepub fn read(&mut self, data: &[u8]) -> Result<Option<DependencyDescriptor>>
pub fn read(&mut self, data: &[u8]) -> Result<Option<DependencyDescriptor>>
Reads the next packet’s descriptor. Ok(None) when it refers to a structure this
reader does not have (see DependencyDescriptor::unmarshal): the packet that carried
it was lost, and the stream cannot be interpreted until a new one arrives (a key
frame).
§Errors
A malformed descriptor.
Sourcepub fn structure(&self) -> Option<&FrameDependencyStructure>
pub fn structure(&self) -> Option<&FrameDependencyStructure>
The structure in force: the last one a packet carried.
Sourcepub fn active_decode_targets(&self) -> u32
pub fn active_decode_targets(&self) -> u32
The decode targets available at the moment, as a bitmask (bit i for decode target
i): the last update received.
Sourcepub fn chain_has_active_decode_target(&self, chain: usize) -> bool
pub fn chain_has_active_decode_target(&self, chain: usize) -> bool
Whether a chain protects a decode target that is active (ChainHasActiveDecodeTarget
of A.6). “Chains protecting no active Decode targets MUST be ignored.”
Sourcepub fn part_of_active_chain(
&self,
descriptor: &DependencyDescriptor,
chain: usize,
) -> bool
pub fn part_of_active_chain( &self, descriptor: &DependencyDescriptor, chain: usize, ) -> bool
Whether the frame descriptor describes is part of an active chain
(PartOfActiveChain of A.6): when a packet of the frame is lost, the frame is one the
chain’s decode targets cannot do without.