pub struct FrameSequence<FrameId, MarkerId, GapId, Pixels> { /* private fields */ }Expand description
An immutable, validated sequence in one coordinate space and clock.
Implementations§
Source§impl<F: Eq, M: Eq, G: Eq, P: AsRef<[u8]>> FrameSequence<F, M, G, P>
impl<F: Eq, M: Eq, G: Eq, P: AsRef<[u8]>> FrameSequence<F, M, G, P>
pub fn new(
frames: Vec<Frame<F, P>>,
markers: Vec<Marker<M>>,
gaps: Vec<DeclaredGap<G>>,
region: Option<FrameRegion>,
mask: Option<BinaryMask>,
) -> Result<Self>where
F: Clone,
Sourcepub fn with_provenance(
frames: Vec<Frame<F, P>>,
markers: Vec<Marker<M>>,
gaps: Vec<DeclaredGap<G>>,
region: Option<FrameRegion>,
mask: Option<BinaryMask>,
provenance: SourceProvenance<F>,
) -> Result<Self>
pub fn with_provenance( frames: Vec<Frame<F, P>>, markers: Vec<Marker<M>>, gaps: Vec<DeclaredGap<G>>, region: Option<FrameRegion>, mask: Option<BinaryMask>, provenance: SourceProvenance<F>, ) -> Result<Self>
Construct a sequence from complete inputs: decoded content and source provenance in one call.
This is the in-memory counterpart of deserialization: both delegate to
the same validating authority, so a caller can construct — with the
same invariants — sequences the wire can express and new cannot,
such as annotations between decoded frames but inside the declared
source range. Self::new remains the convenience path for the plain
full-source shape, and Self::with_source_provenance attaches
provenance to an already-built sequence.
Sourcepub fn with_source_provenance(
self,
source_frame_ids: Vec<F>,
source_indices: Vec<usize>,
source_range: TimeRange,
) -> Result<Self>
pub fn with_source_provenance( self, source_frame_ids: Vec<F>, source_indices: Vec<usize>, source_range: TimeRange, ) -> Result<Self>
Attach the full retained source identity to a bounded decoded subset. Rendering and measurement continue to use the decoded frames, while manifests retain the complete source-frame and time-range provenance.
Annotations are revalidated against the newly declared range through the same shared validators construction uses: reattaching provenance that strands an annotation outside the effective range is an error, not a silent rewrite.