![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Pipeline state tracker. More...
#include <roc_pipeline/state_tracker.h>
Public Member Functions | |
| StateTracker () | |
| Initialize all counters to zero. | |
| sndio::DeviceState | get_state () const |
| Compute current state. | |
| size_t | num_active_sessions () const |
| Get active sessions counter. | |
| void | add_active_sessions (int increment) |
| Add/subtract to active sessions counter. | |
| size_t | num_pending_packets () const |
| Get pending packets counter. | |
| void | add_pending_packets (int increment) |
| Add/subtract to pending packets counter. | |
Pipeline state tracker.
All sender/receiver slots, endpoints, and sessions pass state updates to the tracker, so that the top-level source/sink can quickly check if there is any ongoing activity currently.
Thread-safe.
Definition at line 30 of file state_tracker.h.
| roc::pipeline::StateTracker::StateTracker | ( | ) |
Initialize all counters to zero.
| void roc::pipeline::StateTracker::add_active_sessions | ( | int | increment | ) |
Add/subtract to active sessions counter.
| void roc::pipeline::StateTracker::add_pending_packets | ( | int | increment | ) |
Add/subtract to pending packets counter.
| sndio::DeviceState roc::pipeline::StateTracker::get_state | ( | ) | const |
Compute current state.
| size_t roc::pipeline::StateTracker::num_active_sessions | ( | ) | const |
Get active sessions counter.
| size_t roc::pipeline::StateTracker::num_pending_packets | ( | ) | const |
Get pending packets counter.