OpalJitterBuffer Class Reference
#include <jitter.h>
Public Member Functions |
|
|
| | OpalJitterBuffer (unsigned minJitterDelay, unsigned maxJitterDelay, unsigned timeUnits=8, PINDEX packetSize=2048) |
| virtual | ~OpalJitterBuffer () |
|
|
| void | PrintOn (ostream &strm) const |
|
|
| void | SetDelay (unsigned minJitterDelay, unsigned maxJitterDelay, PINDEX packetSize=2048) |
| void | Reset () |
| virtual PBoolean | WriteData (const RTP_DataFrame &frame, const PTimeInterval &tick=0) |
| virtual PBoolean | ReadData (RTP_DataFrame &frame, const PTimeInterval &tick=0) |
| DWORD | GetCurrentJitterDelay () const |
| DWORD | GetMinJitterDelay () const |
| DWORD | GetMaxJitterDelay () const |
| unsigned | GetTimeUnits () const |
| DWORD | GetPacketsTooLate () const |
| DWORD | GetBufferOverruns () const |
| DWORD | GetMaxConsecutiveMarkerBits () const |
| void | SetMaxConsecutiveMarkerBits (DWORD max) |
Protected Types |
| enum | { e_SynchronisationStart,
e_SynchronisationFill,
e_SynchronisationShrink,
e_SynchronisationDone
} |
typedef std::map< DWORD,
RTP_DataFrame > | FrameMap |
Protected Member Functions |
| DWORD | CalculateRequiredTimestamp (DWORD playOutTimestamp) const |
| bool | AdjustCurrentJitterDelay (int delta) |
Protected Attributes |
| unsigned | m_timeUnits |
| PINDEX | m_packetSize |
| DWORD | m_minJitterDelay |
| | Minimum jitter delay in timestamp units.
|
| DWORD | m_maxJitterDelay |
| | Maximum jitter delay in timestamp units.
|
| int | m_jitterGrowTime |
| | Amaint to increase jitter delay by when get "late" packet.
|
| DWORD | m_jitterShrinkPeriod |
| int | m_jitterShrinkTime |
| | Amount to shrink jitter delay by if consistently filled.
|
| DWORD | m_silenceShrinkPeriod |
| | Reduce jitter delay is silent for this long.
|
| int | m_silenceShrinkTime |
| | Amount to shrink jitter delay by if consistently silent.
|
| DWORD | m_jitterDriftPeriod |
| int | m_currentJitterDelay |
| DWORD | m_packetsTooLate |
| DWORD | m_bufferOverruns |
| DWORD | m_consecutiveMarkerBits |
| DWORD | m_maxConsecutiveMarkerBits |
| DWORD | m_consecutiveLatePackets |
| DWORD | m_averageFrameTime |
| DWORD | m_lastTimestamp |
| DWORD | m_lastSyncSource |
| DWORD | m_bufferFilledTime |
| DWORD | m_bufferLowTime |
| DWORD | m_bufferEmptiedTime |
| int | m_timestampDelta |
| enum OpalJitterBuffer:: { ... } | m_synchronisationState |
| FrameMap | m_frames |
| PMutex | m_bufferMutex |
| RTP_JitterBufferAnalyser * | m_analyser |
Detailed Description
This is an Abstract jitter buffer, which can be used simply in any application. The user is required to use a descendant of this class, and provide a "OnReadPacket" method, so that network packets can be placed in this class instance
Member Typedef Documentation
Member Enumeration Documentation
anonymous enum [protected] |
- Enumerator:
| e_SynchronisationStart |
|
| e_SynchronisationFill |
|
| e_SynchronisationShrink |
|
| e_SynchronisationDone |
|
Constructor & Destructor Documentation
| OpalJitterBuffer::OpalJitterBuffer |
( |
unsigned |
minJitterDelay, |
|
|
unsigned |
maxJitterDelay, |
|
|
unsigned |
timeUnits = 8, |
|
|
PINDEX |
packetSize = 2048 | |
|
) |
| | |
Constructor for this jitter buffer. The size of this buffer can be altered later with the SetDelay method
- Parameters:
-
| minJitterDelay | Minimum delay in RTP timestamp units |
| maxJitterDelay | Maximum delay in RTP timestamp units |
| timeUnits | Time units, usually 8 or 16 |
| packetSize | Max RTP packet size |
| virtual OpalJitterBuffer::~OpalJitterBuffer |
( |
|
) |
[virtual] |
Destructor, which closes this down and deletes the internal list of frames
Member Function Documentation
| bool OpalJitterBuffer::AdjustCurrentJitterDelay |
( |
int |
delta |
) |
[protected] |
| DWORD OpalJitterBuffer::CalculateRequiredTimestamp |
( |
DWORD |
playOutTimestamp |
) |
const [protected] |
| DWORD OpalJitterBuffer::GetBufferOverruns |
( |
|
) |
const [inline] |
Get total number received packets that overran the jitter buffer.
References m_bufferOverruns.
| DWORD OpalJitterBuffer::GetCurrentJitterDelay |
( |
|
) |
const [inline] |
| DWORD OpalJitterBuffer::GetMaxConsecutiveMarkerBits |
( |
|
) |
const [inline] |
| DWORD OpalJitterBuffer::GetMaxJitterDelay |
( |
|
) |
const [inline] |
| DWORD OpalJitterBuffer::GetMinJitterDelay |
( |
|
) |
const [inline] |
| DWORD OpalJitterBuffer::GetPacketsTooLate |
( |
|
) |
const [inline] |
Get total number received packets too late to go into jitter buffer.
References m_packetsTooLate.
| unsigned OpalJitterBuffer::GetTimeUnits |
( |
|
) |
const [inline] |
| void OpalJitterBuffer::PrintOn |
( |
ostream & |
strm |
) |
const |
Report the statistics for this jitter instance
| virtual PBoolean OpalJitterBuffer::ReadData |
( |
RTP_DataFrame & |
frame, |
|
|
const PTimeInterval & |
tick = 0 | |
|
) |
| | [virtual] |
Read a data frame from the jitter buffer. This function never blocks. If no data is available, an RTP packet with zero payload size is returned.
- Parameters:
-
| frame | Frame to extract from jitter buffer |
| tick | Real time tick for packet removal |
| void OpalJitterBuffer::Reset |
( |
|
) |
|
| void OpalJitterBuffer::SetDelay |
( |
unsigned |
minJitterDelay, |
|
|
unsigned |
maxJitterDelay, |
|
|
PINDEX |
packetSize = 2048 | |
|
) |
| | |
Set the maximum delay the jitter buffer will operate to.
- Parameters:
-
| minJitterDelay | Minimum delay in RTP timestamp units |
| maxJitterDelay | Maximum delay in RTP timestamp units |
| packetSize | Max RTP packet size |
| void OpalJitterBuffer::SetMaxConsecutiveMarkerBits |
( |
DWORD |
max |
) |
[inline] |
| virtual PBoolean OpalJitterBuffer::WriteData |
( |
const RTP_DataFrame & |
frame, |
|
|
const PTimeInterval & |
tick = 0 | |
|
) |
| | [virtual] |
Write data frame from the RTP channel.
- Parameters:
-
| frame | Frame to feed into jitter buffer |
| tick | Real time tick for packet arrival |
Field Documentation
Amaint to increase jitter delay by when get "late" packet.
Period (in timestamp units) over which buffer is consistently filled before shrinking
Amount to shrink jitter delay by if consistently filled.
Reduce jitter delay is silent for this long.
Amount to shrink jitter delay by if consistently silent.
The documentation for this class was generated from the following file: