pub struct SampleToGroup {
pub grouping_type: [u8; 4],
pub grouping_type_parameter: Option<u32>,
pub entries: Vec<(u32, u32)>,
}Expand description
One sbgp (SampleToGroupBox) to emit on a track.
grouping_type is the four-byte selector that pairs this box with
an sgpd of the same type. The common types in ISO/IEC 14496-12
are roll (audio roll-back distance), rap (random-access
points), sync (sync samples), alst (alternate startup
sequence), prol (audio preroll); other groupings are defined in
codec-binding specs.
grouping_type_parameter selects an alternative grouping of the
same type when Some(_) (version 1 of sbgp); None emits
version 0.
entries is the run-length table — each pair (sample_count, group_description_index) says “the next sample_count samples
belong to group group_description_index”. group_description_index = 0 means “no group of this type” for the run; an index ≥
0x10001 is a movie-fragment-local reference and is written
verbatim (the muxer does not resolve fragment-local groups). The
cumulative sum(sample_count) should match the track’s total
sample count per §8.9.2.1 — the builder does not validate this.
Fields§
§grouping_type: [u8; 4]Four-byte grouping type (e.g. *b"roll", *b"rap ").
grouping_type_parameter: Option<u32>grouping_type_parameter — selects an alternative grouping of
the same type. Some(_) emits version 1; None emits version 0.
entries: Vec<(u32, u32)>Run-length entries (sample_count, group_description_index).
Empty is a legal “zero-entry” sbgp.
Trait Implementations§
Source§impl Clone for SampleToGroup
impl Clone for SampleToGroup
Source§fn clone(&self) -> SampleToGroup
fn clone(&self) -> SampleToGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more