Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::audio::WatchdogConfig Struct Reference

Watchdog parameters. More...

#include <watchdog.h>

Public Member Functions

 WatchdogConfig ()
 Initialize config with default values. More...
 
void deduce_no_playback_timeout (core::nanoseconds_t target_latency)
 Automatically deduce no_playback_timeout from target_latency. More...
 
void deduce_choppy_playback_window (core::nanoseconds_t timeout)
 Automatically deduce choppy_playback_window from choppy_playback_timeout. More...
 

Public Attributes

core::nanoseconds_t no_playback_timeout
 Timeout for the lack of packets, nanoseconds. More...
 
core::nanoseconds_t choppy_playback_timeout
 Timeout for frequent stuttering, nanoseconds. More...
 
core::nanoseconds_t choppy_playback_window
 Window size of detecting stuttering, nanoseconds. More...
 
size_t frame_status_window
 Frame status window size for logging, number of frames. More...
 

Detailed Description

Watchdog parameters.

Definition at line 28 of file watchdog.h.

Constructor & Destructor Documentation

◆ WatchdogConfig()

roc::audio::WatchdogConfig::WatchdogConfig ( )
inline

Initialize config with default values.

Definition at line 57 of file watchdog.h.

Member Function Documentation

◆ deduce_choppy_playback_window()

void roc::audio::WatchdogConfig::deduce_choppy_playback_window ( core::nanoseconds_t  timeout)
inline

Automatically deduce choppy_playback_window from choppy_playback_timeout.

Definition at line 70 of file watchdog.h.

◆ deduce_no_playback_timeout()

void roc::audio::WatchdogConfig::deduce_no_playback_timeout ( core::nanoseconds_t  target_latency)
inline

Automatically deduce no_playback_timeout from target_latency.

Definition at line 65 of file watchdog.h.

Member Data Documentation

◆ choppy_playback_timeout

core::nanoseconds_t roc::audio::WatchdogConfig::choppy_playback_timeout

Timeout for frequent stuttering, nanoseconds.

Remarks
Maximum allowed period during which every drop detection window overlaps with at least one frame which caused packet drops and with at least one frame which is incomplete (it may be the same frame). After this period, the session is terminated. This mechanism allows to detect the vicious circle when all client packets are a bit late and we are constantly dropping them producing unpleasant noise. Set to zero to disable.

Definition at line 44 of file watchdog.h.

◆ choppy_playback_window

core::nanoseconds_t roc::audio::WatchdogConfig::choppy_playback_window

Window size of detecting stuttering, nanoseconds.

See also
choppy_playback_timeout

Definition at line 49 of file watchdog.h.

◆ frame_status_window

size_t roc::audio::WatchdogConfig::frame_status_window

Frame status window size for logging, number of frames.

Remarks
Used for debug logging. Set to zero to disable.

Definition at line 54 of file watchdog.h.

◆ no_playback_timeout

core::nanoseconds_t roc::audio::WatchdogConfig::no_playback_timeout

Timeout for the lack of packets, nanoseconds.

Remarks
Maximum allowed period during which every frame is blank. After this period, the session is terminated. This mechanism allows to detect dead, hanging, or broken clients. Set to zero to disable.

Definition at line 34 of file watchdog.h.


The documentation for this struct was generated from the following file: