Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::audio::Watchdog Class Reference

Watchdog. More...

#include <watchdog.h>

Inheritance diagram for roc::audio::Watchdog:
roc::audio::IFrameReader roc::core::NonCopyable< T > roc::core::ListNode roc::core::NonCopyable< ListNode >

Public Member Functions

 Watchdog (IFrameReader &reader, const audio::SampleSpec &sample_spec, const WatchdogConfig &config, core::IAllocator &allocator)
 Initialize.
 
bool valid () const
 Check if object is successfully constructed.
 
virtual bool read (Frame &frame)
 Read audio frame.
 
bool update ()
 Update stream.
 
virtual bool read (Frame &frame)=0
 Read audio frame.
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data.
 

Detailed Description

Watchdog.

Remarks
Terminates session if it is considered dead or corrupted.

Definition at line 66 of file watchdog.h.

Constructor & Destructor Documentation

◆ Watchdog()

roc::audio::Watchdog::Watchdog ( IFrameReader reader,
const audio::SampleSpec sample_spec,
const WatchdogConfig config,
core::IAllocator allocator 
)

Initialize.

Member Function Documentation

◆ 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.

◆ update()

bool roc::audio::Watchdog::update ( )

Update stream.

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.

◆ valid()

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

Check if object is successfully constructed.


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