# OpalJitterBufferThread Class Reference

`#include <jitter.h>`

Inheritance diagram for OpalJitterBufferThread:

[legend]
Collaboration diagram for OpalJitterBufferThread:
[legend]

## Public Member Functions

| OpalJitterBufferThread (const Init &init)
| ~OpalJitterBufferThread ()
virtual void | Start ()
| Start jiter buffer.
virtual PBoolean | ReadData (RTP_DataFrame &frame, const PTimeInterval &tick=0)
virtual PBoolean | OnReadPacket (RTP_DataFrame &frame)=0

## Protected Member Functions

| PDECLARE_NOTIFIER (PThread, OpalJitterBufferThread, JitterThreadMain)
void | WaitForThreadTermination ()
| Internal function to be called from derived class destructor.

## Protected Attributes

PThread * | m_jitterThread
bool | m_running

## 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 | ( | const Init & | init | ) |

Parameters:

  init | Initialisation information

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

OpalJitterBufferThread::PDECLARE_NOTIFIER | ( | PThread | ,
|  | OpalJitterBufferThread | ,
|  | JitterThreadMain |  |
| ) |  |  | `[protected]`

virtual PBoolean OpalJitterBufferThread::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.

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

Parameters:

  frame | Frame to extract from jitter buffer
  tick | Real time tick for packet removal

Reimplemented from OpalJitterBuffer.

virtual void OpalJitterBufferThread::Start | ( |  | ) | `[virtual]`

Start jiter buffer.

Reimplemented from OpalJitterBuffer.

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