27 #ifndef PTLIB_DELAYCHAN_H
28 #define PTLIB_DELAYCHAN_H
137 unsigned m_traceLevel;
250 #endif // PTLIB_DELAYCHAN_H
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the file channel.
PTimeInterval m_maximumSlip
Definition: delaychan.h:131
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:51
PINDEX frameSize
Definition: delaychan.h:241
virtual void Wait(PINDEX count, PTimeInterval &nextTick)
This class defines an absolute time and date.
Definition: ptime.h:49
Mode
Definition: delaychan.h:163
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:45
PDelayChannel(Mode mode, unsigned frameDelay, PINDEX frameSize=0, unsigned maximumSlip=250, unsigned minimumDelay=10)
Create a new delay channel with the specified delays.
void SetMaximumSlip(const PTimeInterval &maximumSlip)
Set the number of milliseconds that the delay may "catch up" by using zero delays.
Definition: delaychan.h:74
PTime m_targetTime
Definition: delaychan.h:134
Definition: delaychan.h:165
The delta time interval was zero or negative.
Definition: delaychan.h:102
PTimeInterval GetMaximumSlip() const
Get the current slip time.
Definition: delaychan.h:78
PAdaptiveDelay(const PTimeInterval &maximumSlip=0, const PTimeInterval &minimumDelay=0)
Create a new adaptive delay with the specified parameters.
PTimeInterval m_minimumDelay
Definition: delaychan.h:132
Class for implementing a "delay line" channel.
Definition: delaychan.h:157
Definition: delaychan.h:166
The function was called within the delta time of the expected time and a possible sleep was performed...
Definition: delaychan.h:90
Abstract class defining I/O channel semantics.
Definition: channel.h:103
DelayResult Delay(int deltaMS)
Wait until the specified number of milliseconds have elapsed from the previous call (on average)...
Definition: delaychan.h:119
bool PBoolean
Definition: object.h:174
DelayResult
< Result of call to Delay() or DelayInterval() function call
Definition: delaychan.h:88
Definition: delaychan.h:164
Class for implementing an "adaptive" delay.
Definition: delaychan.h:48
PTimeInterval maximumSlip
Definition: delaychan.h:242
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the file channel.
The function was called greater than delta time intervals late, no sleep was made.
Definition: delaychan.h:98
const PTimeInterval & GetActualDelay() const
Get the actual sleep time of the last call to the delay function.
Definition: delaychan.h:82
PTimeInterval nextWriteTick
Definition: delaychan.h:246
PTimeInterval m_actualDelay
Definition: delaychan.h:133
void Restart()
Invalidate the timer.
bool m_firstTime
Definition: delaychan.h:135
unsigned frameDelay
Definition: delaychan.h:240
DelayResult DelayInterval(const PTimeInterval &delta)
As for Delay() but for more accurate timing.
The function was called in time, and a sleep was performed, but the operating system did not return c...
Definition: delaychan.h:94
PTimeInterval minimumDelay
Definition: delaychan.h:243
PTimeInterval nextReadTick
Definition: delaychan.h:245
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
The function was called more than the m_maximumSlip time late, the adaptation is reset, no sleep is performed.
Definition: delaychan.h:100
Mode mode
Definition: delaychan.h:239