YoloTokenStore Class
Per-stream queue of yolo (or other detection) tokens awaiting a matching frame. More...
Declaration
Included Headers
Public Constructors Index
| YoloTokenStore (size_t streams) | |
|
Create a store sized for streams distinct stream slots. More... | |
Public Member Functions Index
| void | enqueue (size_t idx, int64_t frame_id) |
|
Enqueue a token for stream idx with the given frame_id. More... | |
| std::optional< OrderedToken > | take_ordered () |
|
Pop the oldest token across all streams in arrival order. More... | |
| std::optional< Token > | take (size_t idx) |
|
Pop the oldest token from a specific stream. More... | |
| Stats | stats (size_t idx) const |
|
Snapshot of the per-stream stats. More... | |
Private Member Attributes Index
| std::mutex | order_mu_ |
| std::deque< OrderedToken > | order_q_ |
| std::vector< State > | states_ |
Private Static Functions Index
| static int64_t | now_ms_i64 () |
Description
Per-stream queue of yolo (or other detection) tokens awaiting a matching frame.
Counterpart of PendingVideoStore: detection tokens land here and are paired with the corresponding video frame. Also exposes a global ordered queue (take_ordered) so a downstream consumer can drain tokens in arrival order across all streams.
- See Also
Definition at line 94 of file StrictSync.h.
Public Constructors
YoloTokenStore()
| explicit |
Create a store sized for streams distinct stream slots.
Definition at line 119 of file StrictSync.h.
Public Member Functions
enqueue()
|
Enqueue a token for stream idx with the given frame_id.
Definition at line 122 of file StrictSync.h.
stats()
|
Snapshot of the per-stream stats.
Definition at line 128 of file StrictSync.h.
take()
|
Pop the oldest token from a specific stream.
Definition at line 126 of file StrictSync.h.
take_ordered()
|
Pop the oldest token across all streams in arrival order.
Definition at line 124 of file StrictSync.h.
Private Member Attributes
order_mu_
| mutable |
Definition at line 140 of file StrictSync.h.
order_q_
|
Definition at line 141 of file StrictSync.h.
states_
|
Definition at line 142 of file StrictSync.h.
Private Static Functions
now_ms_i64()
| static |
Definition at line 138 of file StrictSync.h.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.