pub struct SubgroupGaps {
group_id: u64,
common: Option<Vec<u64>>,
}Expand description
The Prior Group ID Gap values the Objects of one subgroup stream carried.
A subgroup stream carries one Group, so its Objects are where “a Group that contains more than one Object with different values for Prior Group ID Gap” (draft-12 Section 10.1) shows on one stream.
This draft does not say whether an Object may carry 0x40 more than once, or which value is that Object’s when it does. draft-12 Section 9.2.1.2 says only “Object Extension Headers are serialized as Key-Value-Pairs”, and the no-repeat rule of draft-12 Section 8.2, “Senders MUST NOT repeat the same parameter type in a message”, covers message Parameters. draft-12 Section 12 leaves it open: “List which headers can be repeated in the table.” So the Objects carry different values only when no value is carried by every one of them: then, whichever of its values is taken as each Object’s, two of them differ. While a value is common to all, taking it as each Object’s makes them equal, and they are not refused. The values one Object carries are not compared with each other, since the condition needs “more than one Object”.
“has a Prior Group ID Gap larger than the Group ID” (draft-12 Section 10.1) also depends on which value is the Object’s. An Object carrying a value larger than the Group ID and one that is not has a gap larger than the Group ID under one reading and not under another, so it is refused only when every value it carries is larger.
Fields§
§group_id: u64§common: Option<Vec<u64>>The values every earlier Object that carried a gap carried, or None
before the first such Object.
Implementations§
Source§impl SubgroupGaps
impl SubgroupGaps
Sourcepub fn new(header: &SubgroupHeader) -> Self
pub fn new(header: &SubgroupHeader) -> Self
Track the Objects of the stream header opens.
Sourcepub fn check(&mut self, object: &ObjectHeader) -> Result<PriorGaps, CodecError>
pub fn check(&mut self, object: &ObjectHeader) -> Result<PriorGaps, CodecError>
Check the next Object on this stream, refusing with
CodecError::MalformedTrack a gap larger than the Group ID, or
values that leave no value common to every Object on the stream that
carried a gap. Records the Object only when it passes.