#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, PBoolean loop)=0 |
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 Attributes | |
PThread * | m_jitterThread |
bool | m_running |
OpalJitterBufferThread::OpalJitterBufferThread | ( | unsigned | minJitterDelay, | |
unsigned | maxJitterDelay, | |||
unsigned | timeUnits = 8 , |
|||
PINDEX | packetSize = 2048 | |||
) |
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 | ( | ) |
virtual PBoolean OpalJitterBufferThread::OnReadPacket | ( | RTP_DataFrame & | frame, | |
PBoolean | loop | |||
) | [pure virtual] |
This class instance collects data from the outside world in this method.
frame | Frame read from the RTP session |
loop | If true, loop as long as data is available, if false, only process once |
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.
frame | Frame to extract from jitter buffer |
Reimplemented from OpalJitterBuffer.
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.
PThread* OpalJitterBufferThread::m_jitterThread [protected] |
bool OpalJitterBufferThread::m_running [protected] |