pub struct TrackSampleGroups {
pub stream_index: usize,
pub sbgp: Vec<SampleToGroup>,
pub sgpd: Vec<SampleGroupDescription>,
pub csgp: Vec<CompactSampleToGroup>,
}Expand description
Per-track sample-group emission request.
Each entry attaches an sbgp (SampleToGroupBox), csgp
(CompactSampleToGroupBox) and / or sgpd (SampleGroupDescriptionBox)
box into one track’s stbl. The halves share grouping_type; the
writer simply serialises whatever the caller supplies — content
interpretation belongs to a layer that knows the grouping-type
semantics (per ISO/IEC 14496-12 §8.9).
Multiple TrackSampleGroups entries may target the same
stream_index; they accumulate in encounter order. The muxer
emits all sgpd boxes first, then all sbgp boxes, then all
csgp boxes, after the chunk-offset table inside each track’s
stbl. sbgp and csgp are alternative encodings of the same
per-sample → group mapping (§8.9.5: “at most one csgp or sbgp
with a given grouping_type may exist per track”); a caller picks
one form per grouping_type and never both.
Fields§
§stream_index: usizeIndex into the muxer’s streams slice (the stream slot that
owns these groups).
sbgp: Vec<SampleToGroup>sbgp boxes to emit for this track. Order is preserved.
sgpd: Vec<SampleGroupDescription>sgpd boxes to emit for this track. Order is preserved.
csgp: Vec<CompactSampleToGroup>csgp (CompactSampleToGroupBox, §8.9.5) boxes to emit for this
track — the compact, bit-packed alternative to sbgp for tracks
whose per-sample group membership is periodic. Order is preserved
and they follow any sbgp. Use csgp or sbgp for a given
grouping_type, never both.
Trait Implementations§
Source§impl Clone for TrackSampleGroups
impl Clone for TrackSampleGroups
Source§fn clone(&self) -> TrackSampleGroups
fn clone(&self) -> TrackSampleGroups
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more