pub struct MultiSourceTracker { /* private fields */ }Expand description
Implementations§
Source§impl MultiSourceTracker
impl MultiSourceTracker
Sourcepub fn new(config: ByteTrackConfig) -> Result<Self, TrackError>
pub fn new(config: ByteTrackConfig) -> Result<Self, TrackError>
Sourcepub const fn config(&self) -> ByteTrackConfig
pub const fn config(&self) -> ByteTrackConfig
Tracker configuration shared by every source.
Sourcepub fn checkpoint(&self) -> MultiSourceCheckpoint
pub fn checkpoint(&self) -> MultiSourceCheckpoint
Snapshot of uid map and per-source trackers for checkpoints.
Sourcepub fn restore(
config: ByteTrackConfig,
checkpoint: MultiSourceCheckpoint,
) -> Result<Self, TrackError>
pub fn restore( config: ByteTrackConfig, checkpoint: MultiSourceCheckpoint, ) -> Result<Self, TrackError>
Sourcepub fn update(
&mut self,
source_id: SourceId,
detections: &[Detection],
) -> Result<Vec<TrackedDetection>, TrackError>
pub fn update( &mut self, source_id: SourceId, detections: &[Detection], ) -> Result<Vec<TrackedDetection>, TrackError>
Sourcepub fn uid_of(&self, key: TrackKey) -> Option<TrackUid>
pub fn uid_of(&self, key: TrackKey) -> Option<TrackUid>
Looks up the global uid for a track key.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Number of independent source trackers currently allocated.
Sourcepub fn reset_source(&mut self, source_id: SourceId)
pub fn reset_source(&mut self, source_id: SourceId)
Drops motion state for one source (local tracks + uid map entries).
Global TrackUid counter is not rewound so historical uids stay unique.
Sourcepub fn remove_source(&mut self, source_id: SourceId)
pub fn remove_source(&mut self, source_id: SourceId)
Alias for Self::reset_source (host reconnect wording).
Sourcepub fn has_source(&self, source_id: SourceId) -> bool
pub fn has_source(&self, source_id: SourceId) -> bool
True when a per-source tracker is currently allocated.
Trait Implementations§
Source§impl Clone for MultiSourceTracker
impl Clone for MultiSourceTracker
Auto Trait Implementations§
impl Freeze for MultiSourceTracker
impl RefUnwindSafe for MultiSourceTracker
impl Send for MultiSourceTracker
impl Sync for MultiSourceTracker
impl Unpin for MultiSourceTracker
impl UnsafeUnpin for MultiSourceTracker
impl UnwindSafe for MultiSourceTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more