pub struct ParameterFootprint { /* private fields */ }Expand description
The heap bytes an AVCodecParameters holds — measured, never
allocated.
See [bounded_clone_parameters] for the rule this measurement
serves and for the field-by-field inventory it is derived from.
Implementations§
Source§impl ParameterFootprint
impl ParameterFootprint
Sourcepub const fn extradata(&self) -> usize
pub const fn extradata(&self) -> usize
Bytes a copy of extradata allocates — the payload plus the
AV_INPUT_BUFFER_PADDING_SIZE trailing zeroes decoders read past
the end into.
The padding is counted because it is allocated: a ceiling that measured only the payload admitted a copy sixty-four bytes larger than it agreed to, once per stream. Zero when there is no extradata at all — no payload, no padding.
Sourcepub const fn extradata_payload(&self) -> usize
pub const fn extradata_payload(&self) -> usize
The extradata_size the parameters declare — the payload alone,
with no padding.
Self::extradata is what a parameter clone costs, padding
included. This is what a carrier costs: the synthesized
attachment road copies these bytes into an FfmpegBytes, which
allocates exactly them, so charging the padded figure against the
attachment budget would bill sixty-four bytes nobody allocates —
and reject a payload sitting in the last sixty-four bytes below
the ceiling that the image road, judging the same bytes, accepts.
Sourcepub const fn coded_side_data(&self) -> usize
pub const fn coded_side_data(&self) -> usize
Bytes across every coded_side_data entry, plus the array of
descriptors itself.
Sourcepub const fn channel_map(&self) -> usize
pub const fn channel_map(&self) -> usize
Bytes in a custom channel map, or zero for every other layout order.
Sourcepub const fn total(&self) -> Option<usize>
pub const fn total(&self) -> Option<usize>
Everything a clone of these parameters would retain.
None on overflow — a set of declared sizes that cannot be added
up is not a set anything should try to copy.
Sourcepub const fn total_without_extradata(&self) -> Option<usize>
pub const fn total_without_extradata(&self) -> Option<usize>
The same total with extradata left out — what a clone retains
when the caller is going to strip it.
The synthesized-attachment road does exactly that: a font’s extradata is its payload, the carrier already holds it, and counting it twice would make the budget describe the file rather than the memory.
Trait Implementations§
Source§impl Clone for ParameterFootprint
impl Clone for ParameterFootprint
Source§fn clone(&self) -> ParameterFootprint
fn clone(&self) -> ParameterFootprint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more