12 #ifndef ROC_AUDIO_WATCHDOG_H_
13 #define ROC_AUDIO_WATCHDOG_H_
102 void update_blank_timeout_(
const Frame& frame,
104 bool check_blank_timeout_()
const;
106 void update_drops_timeout_(
const Frame& frame,
108 bool check_drops_timeout_();
110 void update_status_(
const Frame& frame);
111 void flush_status_();
125 unsigned curr_window_flags_;
Sample specification. Describes sample rate and channels.
virtual bool read(Frame &frame)
Read audio frame.
Watchdog(IFrameReader &reader, const audio::SampleSpec &sample_spec, const WatchdogConfig &config, core::IArena &arena)
Initialize.
bool is_valid() const
Check if object is successfully constructed.
bool is_alive() const
Check if stream is still alive.
Base class for non-copyable objects.
const nanoseconds_t Millisecond
One millisecond represented in nanoseconds.
const nanoseconds_t Second
One second represented in nanoseconds.
int64_t nanoseconds_t
Nanoseconds.
uint32_t stream_timestamp_t
Packet stream timestamp.
core::nanoseconds_t choppy_playback_window
Window size of detecting stuttering, nanoseconds.
WatchdogConfig()
Initialize config with default values.
core::nanoseconds_t choppy_playback_timeout
Timeout for frequent stuttering, nanoseconds.
size_t frame_status_window
Frame status window size for logging, number of frames.
core::nanoseconds_t no_playback_timeout
Timeout for the lack of packets, nanoseconds.
void deduce_no_playback_timeout(core::nanoseconds_t target_latency)
Automatically deduce no_playback_timeout from target_latency.
void deduce_choppy_playback_window(core::nanoseconds_t timeout)
Automatically deduce choppy_playback_window from choppy_playback_timeout.
Various units used in packets.