Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::audio::Watchdog Class Reference

Watchdog. More...

#include <watchdog.h>

Inheritance diagram for roc::audio::Watchdog:
Collaboration diagram for roc::audio::Watchdog:

Public Member Functions

 Watchdog (IFrameReader &reader, const SampleSpec &sample_spec, const WatchdogConfig &config, core::IArena &arena)
 Initialize. More...
 
bool is_valid () const
 Check if object is successfully constructed. More...
 
bool is_alive () const
 Check if stream is still alive. More...
 
virtual bool read (Frame &frame)
 Read audio frame. More...
 
- Public Member Functions inherited from roc::core::ListNode< Tag >
ListDatalist_data () const
 Get pointer to internal data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from roc::core::ListNode< Tag >
static ListNodelist_node (ListData *data)
 Get pointer to parent node from pointer to internal data. More...
 

Detailed Description

Watchdog.

Remarks
Terminates session if it is considered dead or corrupted.

Definition at line 93 of file watchdog.h.

Constructor & Destructor Documentation

◆ Watchdog()

roc::audio::Watchdog::Watchdog ( IFrameReader reader,
const SampleSpec sample_spec,
const WatchdogConfig config,
core::IArena arena 
)

Initialize.

Member Function Documentation

◆ is_alive()

bool roc::audio::Watchdog::is_alive ( ) const

Check if stream is still alive.

Returns
false if during the session timeout each frame has an empty flag or the maximum allowed number of consecutive windows that can contain frames that aren't fully filled and contain dropped packets was exceeded.

◆ is_valid()

bool roc::audio::Watchdog::is_valid ( ) const

Check if object is successfully constructed.

◆ read()

virtual bool roc::audio::Watchdog::read ( Frame frame)
virtual

Read audio frame.

Remarks
Updates stream state and reads frame from the input reader.

Implements roc::audio::IFrameReader.


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