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_defaults (const core::nanoseconds_t target_latency)
 Automatically fill missing settings. 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...
 
core::nanoseconds_t warmup_duration
 Duration of the warmup phase in the beginning, 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 78 of file watchdog.h.

Member Function Documentation

◆ deduce_defaults()

void roc::audio::WatchdogConfig::deduce_defaults ( const core::nanoseconds_t  target_latency)

Automatically fill missing settings.

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.
Note
If zero, default value is used. If negative, the check is disabled.

Definition at line 50 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
Note
If zero, default value is used.

Definition at line 56 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.
Note
If zero, default value is used.

Definition at line 75 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.
Note
If zero, default value is used. If negative, the check is disabled.

Definition at line 37 of file watchdog.h.

◆ warmup_duration

core::nanoseconds_t roc::audio::WatchdogConfig::warmup_duration

Duration of the warmup phase in the beginning, nanoseconds.

Remarks
During the warmup phase blank_timeout is not triggered. After this period last position before blank frames is set to the current position. Warmup can also be terminated in case a non-blank frame occurs during it. This mechanism allows watchdog to work with latency longer than no_playback_timeout. Usually is equal to target_latency.
Note
If zero, default value is used. If negative, warmup phase is disabled.

Definition at line 68 of file watchdog.h.


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