pub struct CompactSampleToGroup {
pub grouping_type: [u8; 4],
pub grouping_type_parameter: Option<u32>,
pub index_msb_indicates_fragment_local_description: bool,
pub patterns: Vec<CompactSampleToGroupPattern>,
}Expand description
One csgp (CompactSampleToGroupBox, ISO/IEC 14496-12:2020 §8.9.5) to
emit on a track — the compact alternative to SampleToGroup.
Where sbgp emits one (sample_count, group_description_index) pair
per run, csgp groups samples into a small set of patterns that
are each replicated across the track: pattern i replays its
indices for sample_count[i] consecutive groups. A track whose
per-sample group membership is periodic (the common reason to pick the
compact form) shrinks dramatically — the index run is bit-packed at
the narrowest width that fits.
Pairs with an sgpd of the same grouping_type exactly like sbgp.
Fields§
§grouping_type: [u8; 4]Four-byte grouping type matching the paired sgpd.
grouping_type_parameter: Option<u32>grouping_type_parameter — selects an alternative grouping of the
same type. Some(_) sets the flag-layout presence bit and emits
the optional u32 field; None omits it.
index_msb_indicates_fragment_local_description: boolindex_msb_indicates_fragment_local_description — flag-layout
bit 7 (§8.9.5). Set it (only legal when emitting into a traf)
to declare that the most-significant bit of each index is a
fragment-local-vs-global sgpd source selector. The builder writes
each index value verbatim; it does not synthesise the selector bit,
so a caller that sets this must pre-set the high bit on indices that
should reference the fragment-local sgpd. Defaults to false
(stbl form / no MSB special-casing).
patterns: Vec<CompactSampleToGroupPattern>The repeating index patterns, in emit order.
Trait Implementations§
Source§impl Clone for CompactSampleToGroup
impl Clone for CompactSampleToGroup
Source§fn clone(&self) -> CompactSampleToGroup
fn clone(&self) -> CompactSampleToGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more