pub struct ClipProvenance {
pub source_first_real_frame: usize,
pub source_last_real_frame: usize,
pub lead_in_frames: usize,
pub synthetic_frame_count: usize,
}Expand description
Where a ReplayClip came from in its source replay, for provenance and for
mapping source frame indices back onto clip frame indices.
Fields§
§source_first_real_frame: usizeIndex, in the source replay, of the first real frame included in the clip (i.e. the frame immediately after the synthetic keyframe).
source_last_real_frame: usizeIndex, in the source replay, of the last real frame included (inclusive).
lead_in_frames: usizeNumber of leading real frames included purely as warm-up before the
region of interest. 0 when the clip was taken by raw frame range.
synthetic_frame_count: usizeNumber of synthetic frames prepended (currently always 1 keyframe, or
0 when the window starts at frame 0 and needs no seeding).
Implementations§
Source§impl ClipProvenance
impl ClipProvenance
Sourcepub fn clip_index_of(&self, source_frame: usize) -> Option<usize>
pub fn clip_index_of(&self, source_frame: usize) -> Option<usize>
Map an index in the source replay to the corresponding index in the
clip’s frames, accounting for the prepended synthetic keyframe. Returns
None if the source frame is outside the clipped window.
Trait Implementations§
Source§impl Clone for ClipProvenance
impl Clone for ClipProvenance
Source§fn clone(&self) -> ClipProvenance
fn clone(&self) -> ClipProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClipProvenance
impl Debug for ClipProvenance
Source§impl<'de> Deserialize<'de> for ClipProvenance
impl<'de> Deserialize<'de> for ClipProvenance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ClipProvenance
impl PartialEq for ClipProvenance
Source§fn eq(&self, other: &ClipProvenance) -> bool
fn eq(&self, other: &ClipProvenance) -> bool
self and other values to be equal, and is used by ==.