OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Protected Member Functions | Protected Attributes
OpalJitterBufferThread Class Reference

`#include <jitter.h>`

Inheritance diagram for OpalJitterBufferThread:

## Public Member Functions

| OpalJitterBufferThread (unsigned minJitterDelay, unsigned maxJitterDelay, unsigned timeUnits=8, PINDEX packetSize=2048)
| ~OpalJitterBufferThread ()
virtual PBoolean | ReadData (RTP_DataFrame &frame)
virtual PBoolean | OnReadPacket (RTP_DataFrame &frame)=0
Public Member Functions inherited from OpalJitterBuffer
| 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 Member Functions

| PDECLARE_NOTIFIER (PThread, OpalJitterBufferThread, JitterThreadMain)
void | StartThread ()
| Internal function to be called from derived class constructor.
void | WaitForThreadTermination ()
| Internal function to be called from derived class destructor.
Protected Member Functions inherited from OpalJitterBuffer
DWORD | CalculateRequiredTimestamp (DWORD playOutTimestamp) const
bool | AdjustCurrentJitterDelay (int delta)

## Protected Attributes

PThread * | m_jitterThread
bool | m_running
Protected Attributes inherited from OpalJitterBuffer
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_bufferFilledTime
DWORD | m_bufferLowTime
DWORD | m_bufferEmptiedTime
int | m_timestampDelta
enum OpalJitterBuffer:: { ... } | m_synchronisationState
FrameMap | m_frames
PMutex | m_bufferMutex
RTP_JitterBufferAnalyser * | m_analyser

## Additional Inherited Members

Protected Types inherited from OpalJitterBuffer
enum | { e_SynchronisationStart, e_SynchronisationFill, e_SynchronisationShrink, e_SynchronisationDone }
typedef std::map< DWORD, RTP_DataFrame > | FrameMap

## Detailed Description

A descendant of the OpalJitterBuffer that starts a thread to read from something continuously and feed it into the jitter buffer.

## Constructor & Destructor Documentation

OpalJitterBufferThread::OpalJitterBufferThread | ( | unsigned | minJitterDelay,
|  | unsigned | maxJitterDelay,
|  | unsigned | timeUnits = `8`,
|  | PINDEX | packetSize = `2048`
| ) |  |

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

OpalJitterBufferThread::~OpalJitterBufferThread | ( |  | ) |

## Member Function Documentation

virtual PBoolean OpalJitterBufferThread::OnReadPacket | ( | RTP_DataFrame & | frame | ) |

pure virtual

This class instance collects data from the outside world in this method.

Returns:
  true on successful read, false on faulty read.

Parameters:

  frame | Frame read from the RTP session

Implemented in RTP_JitterBuffer.

OpalJitterBufferThread::PDECLARE_NOTIFIER | ( | PThread | ,
|  | OpalJitterBufferThread | ,
|  | JitterThreadMain |
| ) |  |

protected

virtual PBoolean OpalJitterBufferThread::ReadData | ( | RTP_DataFrame & | frame | ) |

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.

Override of base class so can terminate caller when shutting down.

Parameters:

  frame | Frame to extract from jitter buffer

void OpalJitterBufferThread::StartThread | ( |  | ) |

protected

Internal function to be called from derived class constructor.

void OpalJitterBufferThread::WaitForThreadTermination | ( |  | ) |

protected

Internal function to be called from derived class destructor.

## Field Documentation

PThread* OpalJitterBufferThread::m_jitterThread

protected

bool OpalJitterBufferThread::m_running

protected

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

- jitter.h