pub struct H265DepacketizationBuffer { /* private fields */ }Expand description
The de-packetization buffer of RFC 7798 section 6, for a stream whose sprop-max-don-diff
is greater than 0: NAL units go in in reception order and come out in decoding order, by
AbsDon (section 4.6).
A NAL unit leaves, the smallest AbsDon first, whenever the AbsDon values in the buffer span
sprop-max-don-diff or more (condition A) or the buffer holds more than
sprop-depack-buf-nalus NAL units (condition B).
Implementations§
Source§impl H265DepacketizationBuffer
impl H265DepacketizationBuffer
Sourcepub fn new(sprop_max_don_diff: u16, sprop_depack_buf_nalus: u16) -> Self
pub fn new(sprop_max_don_diff: u16, sprop_depack_buf_nalus: u16) -> Self
A buffer for a stream with these sprop-max-don-diff and sprop-depack-buf-nalus
media type parameters (RFC 7798 section 7.1; both are 0 to 32767).
Sourcepub fn push(&mut self, unit: H265NalUnit) -> Vec<H265NalUnit>
pub fn push(&mut self, unit: H265NalUnit) -> Vec<H265NalUnit>
Stores a NAL unit and returns the NAL units that are now due, in decoding order. A NAL unit without a DON is returned as it is.
Sourcepub fn flush(&mut self) -> Vec<H265NalUnit>
pub fn flush(&mut self) -> Vec<H265NalUnit>
Empties the buffer, in order of increasing AbsDon: no more NAL units are coming.