# OpalRTPSession Class Reference

`#include <rtp_session.h>`

Inheritance diagram for OpalRTPSession:

[legend]
Collaboration diagram for OpalRTPSession:
[legend]

## Call back functions

enum | SendReceiveStatus { e_ProcessPacket, e_IgnorePacket, e_AbortTransport }
virtual SendReceiveStatus | OnSendData (RTP_DataFrame &frame)
virtual SendReceiveStatus | OnSendControl (RTP_ControlFrame &frame)
virtual SendReceiveStatus | OnReceiveData (RTP_DataFrame &frame)
virtual SendReceiveStatus | OnReceiveControl (RTP_ControlFrame &frame)
| PARRAY (ReceiverReportArray, ReceiverReport)
virtual void | OnRxSenderReport (const SenderReport &sender, const ReceiverReportArray &reports)
virtual void | OnRxReceiverReport (DWORD src, const ReceiverReportArray &reports)
virtual void | OnReceiverReports (const ReceiverReportArray &reports)
| PARRAY (SourceDescriptionArray, SourceDescription)
virtual void | OnRxSourceDescription (const SourceDescriptionArray &descriptions)
virtual void | OnRxGoodbye (const PDWORDArray &sources, const PString &reason)
virtual void | OnRxApplDefined (const PString &type, unsigned subtype, DWORD src, const BYTE *data, PINDEX size)

## Member variable access

enum | { JitterRoundingGuardBits = 4 }
bool | IsAudio () const
void | SetAudio (bool aud)
PString | GetCanonicalName () const
void | SetCanonicalName (const PString &name)
PString | GetToolName () const
void | SetToolName (const PString &name)
RTPExtensionHeaders | GetExtensionHeaders () const
void | SetExtensionHeader (const RTPExtensionHeaders &ext)
DWORD | GetSyncSourceOut () const
bool | AllowAnySyncSource () const
void | SetAnySyncSource (bool allow)
void | SetIgnorePayloadTypeChanges (bool ignore)
const PTimeInterval & | GetMaxNoReceiveTime ()
void | SetMaxNoReceiveTime (const PTimeInterval &interval)
const PTimeInterval & | GetMaxNoTransmitTime ()
void | SetMaxNoTransmitTime (const PTimeInterval &interval)
const PTimeInterval & | GetReportTimeInterval ()
void | SetReportTimeInterval (const PTimeInterval &interval)
unsigned | GetTxStatisticsInterval ()
void | SetTxStatisticsInterval (unsigned packets)
unsigned | GetRxStatisticsInterval ()
void | SetRxStatisticsInterval (unsigned packets)
void | ClearStatistics ()
virtual WORD | GetLocalDataPort () const
virtual WORD | GetLocalControlPort () const
virtual WORD | GetRemoteDataPort () const
virtual WORD | GetRemoteControlPort () const
virtual PUDPSocket & | GetDataSocket ()
virtual PUDPSocket & | GetControlSocket ()
DWORD | GetPacketsSent () const
DWORD | GetOctetsSent () const
DWORD | GetPacketsReceived () const
DWORD | GetOctetsReceived () const
DWORD | GetPacketsLost () const
DWORD | GetPacketsLostByRemote () const
DWORD | GetPacketsOutOfOrder () const
DWORD | GetPacketsTooLate () const
DWORD | GetPacketOverruns () const
DWORD | GetAverageSendTime () const
DWORD | GetMarkerRecvCount () const
DWORD | GetMarkerSendCount () const
DWORD | GetMaximumSendTime () const
DWORD | GetMinimumSendTime () const
DWORD | GetAverageReceiveTime () const
DWORD | GetMaximumReceiveTime () const
DWORD | GetMinimumReceiveTime () const
DWORD | GetAvgJitterTime () const
DWORD | GetMaxJitterTime () const
DWORD | GetJitterTimeOnRemote () const

## Public Types

typedef PNotifierTemplate< SendReceiveStatus & > | FilterNotifier
| e_ProcessPacket
| e_IgnorePacket
| e_AbortTransport
| JitterRoundingGuardBits = 4

## Public Member Functions

virtual void | SetCloseOnBYE (bool v)
virtual void | SendFlowControl (unsigned maxBitRate, unsigned overhead=0, bool notify=false)
virtual void | SendIntraFrameRequest (bool rfc2032, bool pictureLoss)
virtual void | SendTemporalSpatialTradeOff (unsigned tradeOff)
void | SetNextSentSequenceNumber (WORD num)
DWORD | GetSyncSourceIn () const
void | AddFilter (const FilterNotifier &filter)
virtual void | SendBYE ()
Construction
| OpalRTPSession (const Init &init)
| ~OpalRTPSession ()
Overrides from class OpalMediaSession
virtual const PCaselessString & | GetSessionType () const
virtual bool | Open (const PString &localInterface, const OpalTransportAddress &remoteAddress, bool isMediaAddress)
virtual bool | IsOpen () const
virtual bool | Close ()
virtual bool | Shutdown (bool reading)
virtual OpalTransportAddress | GetLocalAddress (bool isMediaAddress=true) const
virtual OpalTransportAddress | GetRemoteAddress (bool isMediaAddress=true) const
virtual bool | SetRemoteAddress (const OpalTransportAddress &remoteAddress, bool isMediaAddress=true)
virtual void | AttachTransport (Transport &transport)
virtual Transport | DetachTransport ()
virtual void | SetExternalTransport (const OpalTransportAddressArray &transports)
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
Operations
void | SetJitterBufferSize (const OpalJitterBuffer::Init &init)
unsigned | GetJitterBufferSize () const
unsigned | GetJitterBufferDelay () const
unsigned | GetJitterTimeUnits () const
virtual bool | ReadData (RTP_DataFrame &frame)
virtual void | FlushData ()
virtual bool | WriteData (RTP_DataFrame &frame)
virtual bool | WriteOOBData (RTP_DataFrame &frame, bool rewriteTimeStamp=true)
virtual bool | WriteControl (RTP_ControlFrame &frame)
virtual void | Restart (bool isReading)
virtual PString | GetLocalHostName ()
virtual void | GetStatistics (OpalMediaStatistics &statistics, bool receiver) const

## Static Public Member Functions

static const PCaselessString & | RTP_AVP ()
static const PCaselessString & | RTP_AVPF ()

## Protected Types

typedef PSafePtr< OpalJitterBuffer, PSafePtrMultiThreaded > | JitterBufferPtr

## Protected Member Functions

ReceiverReportArray | BuildReceiverReportArray (const RTP_ControlFrame &frame, PINDEX offset)
void | AddReceiverReport (RTP_ControlFrame::ReceiverReport &receiver)
bool | InsertReportPacket (RTP_ControlFrame &report)
virtual int | WaitForPDU (PUDPSocket &dataSocket, PUDPSocket &controlSocket, const PTimeInterval &timer)
virtual SendReceiveStatus | ReadDataPDU (RTP_DataFrame &frame)
virtual SendReceiveStatus | OnReadTimeout (RTP_DataFrame &frame)
virtual bool | InternalReadData (RTP_DataFrame &frame)
virtual SendReceiveStatus | ReadControlPDU ()
virtual SendReceiveStatus | ReadDataOrControlPDU (BYTE *framePtr, PINDEX frameSize, bool fromDataChannel)
virtual bool | HandleUnreachable (PTRACE_PARAM(const char *channelName))
virtual bool | WriteDataOrControlPDU (const BYTE *framePtr, PINDEX frameSize, bool toDataChannel)
void | SaveOutOfOrderPacket (RTP_DataFrame &frame)
| PDECLARE_NOTIFIER (PTimer, OpalRTPSession, SendReport)

## Protected Attributes

bool | m_isAudio
unsigned | m_timeUnits
PString | m_canonicalName
PString | m_toolName
RTPExtensionHeaders | m_extensionHeaders
PTimeInterval | m_maxNoReceiveTime
PTimeInterval | m_maxNoTransmitTime
DWORD | syncSourceOut
DWORD | syncSourceIn
DWORD | lastSentTimestamp
bool | allowAnySyncSource
bool | allowOneSyncSourceChange
bool | allowRemoteTransmitAddressChange
bool | allowSequenceChange
unsigned | txStatisticsInterval
unsigned | rxStatisticsInterval
WORD | lastSentSequenceNumber
WORD | expectedSequenceNumber
PTimeInterval | lastSentPacketTime
PTimeInterval | lastReceivedPacketTime
PTime | lastSRTimestamp
PTime | lastSRReceiveTime
PTimeInterval | delaySinceLastSR
WORD | lastRRSequenceNumber
bool | resequenceOutOfOrderPackets
unsigned | consecutiveOutOfOrderPackets
PTimeInterval | outOfOrderWaitTime
PTimeInterval | outOfOrderPacketTime
std::list< RTP_DataFrame > | m_outOfOrderPackets
DWORD | timeStampOffs
bool | oobTimeStampBaseEstablished
DWORD | oobTimeStampOutBase
PTimeInterval | oobTimeStampBase
PTime | firstPacketSent
DWORD | packetsSent
DWORD | rtcpPacketsSent
DWORD | octetsSent
PTime | firstPacketReceived
DWORD | packetsReceived
DWORD | senderReportsReceived
DWORD | octetsReceived
DWORD | packetsLost
DWORD | packetsLostByRemote
DWORD | packetsOutOfOrder
DWORD | averageSendTime
DWORD | maximumSendTime
DWORD | minimumSendTime
DWORD | averageReceiveTime
DWORD | maximumReceiveTime
DWORD | minimumReceiveTime
DWORD | jitterLevel
DWORD | jitterLevelOnRemote
DWORD | maximumJitterLevel
DWORD | m_syncTimestamp
PTime | m_syncRealTime
DWORD | markerSendCount
DWORD | markerRecvCount
unsigned | txStatisticsCount
unsigned | rxStatisticsCount
DWORD | averageSendTimeAccum
DWORD | maximumSendTimeAccum
DWORD | minimumSendTimeAccum
DWORD | averageReceiveTimeAccum
DWORD | maximumReceiveTimeAccum
DWORD | minimumReceiveTimeAccum
DWORD | packetsLostSinceLastRR
DWORD | lastTransitTime
DWORD | m_lastReceivedStatisticTimestamp
RTP_DataFrame::PayloadTypes | lastReceivedPayloadType
bool | ignorePayloadTypeChanges
PMutex | m_reportMutex
PTimer | m_reportTimer
PMutex | m_dataMutex
bool | m_closeOnBye
bool | m_byeSent
list< FilterNotifier > | m_filters
PIPSocket::Address | m_localAddress
WORD | m_localDataPort
WORD | m_localControlPort
PIPSocket::Address | m_remoteAddress
WORD | m_remoteDataPort
WORD | m_remoteControlPort
PIPSocket::Address | m_remoteTransmitAddress
PUDPSocket * | m_dataSocket
PUDPSocket * | m_controlSocket
bool | m_shutdownRead
bool | m_shutdownWrite
bool | m_remoteBehindNAT
bool | m_localHasRestrictedNAT
bool | m_firstControl
DWORD | m_noTransmitErrors
PSimpleTimer | m_noTransmitTimer
JitterBufferPtr | m_jitterBuffer

## Friends

class | RTP_JitterBuffer

## Data Structures

class | ReceiverReport
class | SenderReport
class | SourceDescription

## Detailed Description

This class is for encpsulating the IETF Real Time Protocol interface.

## Member Typedef Documentation

typedef PNotifierTemplate<SendReceiveStatus &> OpalRTPSession::FilterNotifier

typedef PSafePtr<OpalJitterBuffer, PSafePtrMultiThreaded> OpalRTPSession::JitterBufferPtr `[protected]`

## Member Enumeration Documentation

anonymous enum

Enumerator:

  JitterRoundingGuardBits |

enum OpalRTPSession::SendReceiveStatus

Enumerator:

  e_ProcessPacket |
  e_IgnorePacket |
  e_AbortTransport |

## Constructor & Destructor Documentation

OpalRTPSession::OpalRTPSession | ( | const Init & | init | ) |

Create a new RTP session.

OpalRTPSession::~OpalRTPSession | ( |  | ) |

Delete a session. This deletes the userData field if autoDeleteUserData is true.

## Member Function Documentation

void OpalRTPSession::AddFilter | ( | const FilterNotifier & | filter | ) |

void OpalRTPSession::AddReceiverReport | ( | RTP_ControlFrame::ReceiverReport & | receiver | ) | `[protected]`

bool OpalRTPSession::AllowAnySyncSource | ( |  | ) | const`[inline]`

Indicate if will ignore all but first received SSRC value.

virtual void OpalRTPSession::AttachTransport | ( | Transport & | transport | ) | `[virtual]`

ReceiverReportArray OpalRTPSession::BuildReceiverReportArray | ( | const RTP_ControlFrame & | frame,
|  | PINDEX | offset |
| ) |  |  | `[protected]`

void OpalRTPSession::ClearStatistics | ( |  | ) |

Clear statistics

virtual bool OpalRTPSession::Close | ( |  | ) | `[virtual]`

Reimplemented from OpalMediaSession.

virtual OpalMediaStream* OpalRTPSession::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat,
|  | unsigned | sessionID,
|  | bool | isSource |
| ) |  |  | `[virtual]`

Implements OpalMediaSession.

virtual Transport OpalRTPSession::DetachTransport | ( |  | ) | `[virtual]`

Reimplemented from OpalMediaSession.

virtual void OpalRTPSession::FlushData | ( |  | ) | `[virtual]`

Flush incoming data.

DWORD OpalRTPSession::GetAverageReceiveTime | ( |  | ) | const`[inline]`

Get average time between received packets. This is averaged over the last rxStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetAverageSendTime | ( |  | ) | const`[inline]`

Get average time between sent packets. This is averaged over the last txStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetAvgJitterTime | ( |  | ) | const`[inline]`

Get averaged jitter time for received packets. This is the calculated statistical variance of the interarrival time of received packets in milliseconds.

PString OpalRTPSession::GetCanonicalName | ( |  | ) | const

Get the canonical name for the RTP session.

virtual PUDPSocket& OpalRTPSession::GetControlSocket | ( |  | ) | `[inline, virtual]`

Get control UDP socket of session.

virtual PUDPSocket& OpalRTPSession::GetDataSocket | ( |  | ) | `[inline, virtual]`

Get data UDP socket of session.

RTPExtensionHeaders OpalRTPSession::GetExtensionHeaders | ( |  | ) | const

Get the RTP header extension codes for the session.

unsigned OpalRTPSession::GetJitterBufferDelay | ( |  | ) | const`[inline]`

unsigned OpalRTPSession::GetJitterBufferSize | ( |  | ) | const

Get current size of the jitter buffer. This returns the currently used jitter buffer delay in RTP timestamp units. It will be some value between the minimum and maximum set in the SetJitterBufferSize() function.

DWORD OpalRTPSession::GetJitterTimeOnRemote | ( |  | ) | const`[inline]`

Get jitter time for received packets on remote. This is the calculated statistical variance of the interarrival time of received packets in milliseconds.

unsigned OpalRTPSession::GetJitterTimeUnits | ( |  | ) | const`[inline]`

Get current time units of the jitter buffer.

virtual OpalTransportAddress OpalRTPSession::GetLocalAddress | ( | bool | isMediaAddress = `true` | ) | const`[virtual]`

Reimplemented from OpalMediaSession.

virtual WORD OpalRTPSession::GetLocalControlPort | ( |  | ) | const`[inline, virtual]`

Get local control port of session.

virtual WORD OpalRTPSession::GetLocalDataPort | ( |  | ) | const`[inline, virtual]`

Get local data port of session.

virtual PString OpalRTPSession::GetLocalHostName | ( |  | ) | `[virtual]`

Get the local host name as used in SDES packes.

DWORD OpalRTPSession::GetMarkerRecvCount | ( |  | ) | const`[inline]`

Get the number of marker packets received this session. This can be used to find out the number of frames received in a video RTP stream.

DWORD OpalRTPSession::GetMarkerSendCount | ( |  | ) | const`[inline]`

Get the number of marker packets sent this session. This can be used to find out the number of frames sent in a video RTP stream.

DWORD OpalRTPSession::GetMaximumReceiveTime | ( |  | ) | const`[inline]`

Get maximum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetMaximumSendTime | ( |  | ) | const`[inline]`

Get maximum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetMaxJitterTime | ( |  | ) | const`[inline]`

Get averaged jitter time for received packets. This is the maximum value of jitterLevel for the session.

const PTimeInterval& OpalRTPSession::GetMaxNoReceiveTime | ( |  | ) | `[inline]`

Get the maximum time we wait for packets from remote.

const PTimeInterval& OpalRTPSession::GetMaxNoTransmitTime | ( |  | ) | `[inline]`

Get the maximum time we wait for remote to start accepting out packets.

DWORD OpalRTPSession::GetMinimumReceiveTime | ( |  | ) | const`[inline]`

Get minimum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetMinimumSendTime | ( |  | ) | const`[inline]`

Get minimum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.

DWORD OpalRTPSession::GetOctetsReceived | ( |  | ) | const`[inline]`

Get total number of octets received in session.

DWORD OpalRTPSession::GetOctetsSent | ( |  | ) | const`[inline]`

Get total number of octets sent in session.

DWORD OpalRTPSession::GetPacketOverruns | ( |  | ) | const

Get total number received packets that could not fit into the jitter buffer.

DWORD OpalRTPSession::GetPacketsLost | ( |  | ) | const`[inline]`

Get total number received packets lost in session.

DWORD OpalRTPSession::GetPacketsLostByRemote | ( |  | ) | const`[inline]`

Get total number transmitted packets lost by remote in session. Determined via RTCP.

DWORD OpalRTPSession::GetPacketsOutOfOrder | ( |  | ) | const`[inline]`

Get total number of packets received out of order in session.

DWORD OpalRTPSession::GetPacketsReceived | ( |  | ) | const`[inline]`

Get total number of packets received in session.

DWORD OpalRTPSession::GetPacketsSent | ( |  | ) | const`[inline]`

Get total number of packets sent in session.

DWORD OpalRTPSession::GetPacketsTooLate | ( |  | ) | const

Get total number received packets too late to go into jitter buffer.

virtual OpalTransportAddress OpalRTPSession::GetRemoteAddress | ( | bool | isMediaAddress = `true` | ) | const`[virtual]`

Reimplemented from OpalMediaSession.

virtual WORD OpalRTPSession::GetRemoteControlPort | ( |  | ) | const`[inline, virtual]`

Get remote control port of session.

virtual WORD OpalRTPSession::GetRemoteDataPort | ( |  | ) | const`[inline, virtual]`

Get remote data port of session.

const PTimeInterval& OpalRTPSession::GetReportTimeInterval | ( |  | ) | `[inline]`

Get the time interval for sending RTCP reports in the session.

unsigned OpalRTPSession::GetRxStatisticsInterval | ( |  | ) | `[inline]`

Get the interval for receiver statistics in the session.

virtual const PCaselessString& OpalRTPSession::GetSessionType | ( |  | ) | const`[inline, virtual]`

Implements OpalMediaSession.

virtual void OpalRTPSession::GetStatistics | ( | OpalMediaStatistics & | statistics,
|  | bool | receiver |
| ) |  |  | const`[virtual]`

Reimplemented from OpalMediaSession.

DWORD OpalRTPSession::GetSyncSourceIn | ( |  | ) | const`[inline]`

DWORD OpalRTPSession::GetSyncSourceOut | ( |  | ) | const`[inline]`

Get the source output identifier.

PString OpalRTPSession::GetToolName | ( |  | ) | const

Get the tool name for the RTP session.

unsigned OpalRTPSession::GetTxStatisticsInterval | ( |  | ) | `[inline]`

Get the interval for transmitter statistics in the session.

virtual bool OpalRTPSession::HandleUnreachable | ( | PTRACE_PARAM(const char *channelName) |  | ) | `[protected, virtual]`

bool OpalRTPSession::InsertReportPacket | ( | RTP_ControlFrame & | report | ) | `[protected]`

virtual bool OpalRTPSession::InternalReadData | ( | RTP_DataFrame & | frame | ) | `[protected, virtual]`

bool OpalRTPSession::IsAudio | ( |  | ) | const`[inline]`

Get flag for is audio RTP.

virtual bool OpalRTPSession::IsOpen | ( |  | ) | const`[virtual]`

Reimplemented from OpalMediaSession.

virtual SendReceiveStatus OpalRTPSession::OnReadTimeout | ( | RTP_DataFrame & | frame | ) | `[protected, virtual]`

virtual SendReceiveStatus OpalRTPSession::OnReceiveControl | ( | RTP_ControlFrame & | frame | ) | `[virtual]`

virtual SendReceiveStatus OpalRTPSession::OnReceiveData | ( | RTP_DataFrame & | frame | ) | `[virtual]`

virtual void OpalRTPSession::OnReceiverReports | ( | const ReceiverReportArray & | reports | ) | `[virtual]`

virtual void OpalRTPSession::OnRxApplDefined | ( | const PString & | type,
|  | unsigned | subtype,
|  | DWORD | src,
|  | const BYTE * | data,
|  | PINDEX | size |
| ) |  |  | `[virtual]`

virtual void OpalRTPSession::OnRxGoodbye | ( | const PDWORDArray & | sources,
|  | const PString & | reason |
| ) |  |  | `[virtual]`

virtual void OpalRTPSession::OnRxReceiverReport | ( | DWORD | src,
|  | const ReceiverReportArray & | reports |
| ) |  |  | `[virtual]`

virtual void OpalRTPSession::OnRxSenderReport | ( | const SenderReport & | sender,
|  | const ReceiverReportArray & | reports |
| ) |  |  | `[virtual]`

virtual void OpalRTPSession::OnRxSourceDescription | ( | const SourceDescriptionArray & | descriptions | ) | `[virtual]`

virtual SendReceiveStatus OpalRTPSession::OnSendControl | ( | RTP_ControlFrame & | frame | ) | `[virtual]`

virtual SendReceiveStatus OpalRTPSession::OnSendData | ( | RTP_DataFrame & | frame | ) | `[virtual]`

virtual bool OpalRTPSession::Open | ( | const PString & | localInterface,
|  | const OpalTransportAddress & | remoteAddress,
|  | bool | isMediaAddress |
| ) |  |  | `[virtual]`

Reimplemented from OpalMediaSession.

OpalRTPSession::PARRAY | ( | SourceDescriptionArray | ,
|  | SourceDescription |  |
| ) |  |  |

OpalRTPSession::PARRAY | ( | ReceiverReportArray | ,
|  | ReceiverReport |  |
| ) |  |  |

OpalRTPSession::PDECLARE_NOTIFIER | ( | PTimer | ,
|  | OpalRTPSession | ,
|  | SendReport |  |
| ) |  |  | `[protected]`

virtual SendReceiveStatus OpalRTPSession::ReadControlPDU | ( |  | ) | `[protected, virtual]`

virtual bool OpalRTPSession::ReadData | ( | RTP_DataFrame & | frame | ) | `[virtual]`

Read a data frame from the RTP channel. This function will conditionally read data from the jitter buffer or directly if there is no jitter buffer enabled.

Parameters:

  frame | Frame read from the RTP session

virtual SendReceiveStatus OpalRTPSession::ReadDataOrControlPDU | ( | BYTE * | framePtr,
|  | PINDEX | frameSize,
|  | bool | fromDataChannel |
| ) |  |  | `[protected, virtual]`

virtual SendReceiveStatus OpalRTPSession::ReadDataPDU | ( | RTP_DataFrame & | frame | ) | `[protected, virtual]`

virtual void OpalRTPSession::Restart | ( | bool | isReading | ) | `[virtual]`

Restarts an existing session in the given direction.

static const PCaselessString& OpalRTPSession::RTP_AVP | ( |  | ) | `[static]`

static const PCaselessString& OpalRTPSession::RTP_AVPF | ( |  | ) | `[static]`

void OpalRTPSession::SaveOutOfOrderPacket | ( | RTP_DataFrame & | frame | ) | `[protected]`

virtual void OpalRTPSession::SendBYE | ( |  | ) | `[virtual]`

virtual void OpalRTPSession::SendFlowControl | ( | unsigned | maxBitRate,
|  | unsigned | overhead = `0`,
|  | bool | notify = `false` |
| ) |  |  | `[virtual]`

Send flow control (Temporary Maximum Media Stream Bit Rate) Request/Notification.

Parameters:

  maxBitRate | New temporary maximum bit rate
  overhead | Protocol overhead, defaults to IP/UDP/RTP header size
  notify | Send request/notification

virtual void OpalRTPSession::SendIntraFrameRequest | ( | bool | rfc2032,
|  | bool | pictureLoss |
| ) |  |  | `[virtual]`

Tell the rtp session to send out an intra frame request control packet. This is called when the media stream receives an OpalVideoUpdatePicture media command.

virtual void OpalRTPSession::SendTemporalSpatialTradeOff | ( | unsigned | tradeOff | ) | `[virtual]`

Tell the rtp session to send out an temporal spatial trade off request control packet. This is called when the media stream receives an OpalTemporalSpatialTradeOff media command.

void OpalRTPSession::SetAnySyncSource | ( | bool | allow | ) | `[inline]`

Indicate if will ignore all but first received SSRC value.

Parameters:

  allow | Flag for allow any SSRC values

void OpalRTPSession::SetAudio | ( | bool | aud | ) | `[inline]`

Set flag for RTP session is audio.

Parameters:

  aud | New audio indication flag

void OpalRTPSession::SetCanonicalName | ( | const PString & | name | ) |

Set the canonical name for the RTP session.

virtual void OpalRTPSession::SetCloseOnBYE | ( | bool | v | ) | `[inline, virtual]`

void OpalRTPSession::SetExtensionHeader | ( | const RTPExtensionHeaders & | ext | ) |

Set the RTP header extension codes for the session.

virtual void OpalRTPSession::SetExternalTransport | ( | const OpalTransportAddressArray & | transports | ) | `[virtual]`

Reimplemented from OpalMediaSession.

void OpalRTPSession::SetIgnorePayloadTypeChanges | ( | bool | ignore | ) | `[inline]`

Indicate if will ignore rtp payload type changes in received packets.

Parameters:

  ignore | Flag to ignore payload type changes

void OpalRTPSession::SetJitterBufferSize | ( | const OpalJitterBuffer::Init & | init | ) |

Sets the size of the jitter buffer to be used by this RTP session. A session defaults to not having any jitter buffer enabled for reading and the ReadBufferedData() function simply calls ReadData().

If either jitter delay parameter is zero, it destroys the jitter buffer attached to this RTP session.

Parameters:

  init | Initialisation information

void OpalRTPSession::SetMaxNoReceiveTime | ( | const PTimeInterval & | interval | ) | `[inline]`

Set the maximum time we wait for packets from remote.

Parameters:

  interval | New time interval for reports.

void OpalRTPSession::SetMaxNoTransmitTime | ( | const PTimeInterval & | interval | ) | `[inline]`

Set the maximum time we wait for remote to start accepting out packets.

Parameters:

  interval | New time interval for reports.

void OpalRTPSession::SetNextSentSequenceNumber | ( | WORD | num | ) | `[inline]`

virtual bool OpalRTPSession::SetRemoteAddress | ( | const OpalTransportAddress & | remoteAddress,
|  | bool | isMediaAddress = `true` |
| ) |  |  | `[virtual]`

Reimplemented from OpalMediaSession.

void OpalRTPSession::SetReportTimeInterval | ( | const PTimeInterval & | interval | ) | `[inline]`

Set the time interval for sending RTCP reports in the session.

Parameters:

  interval | New time interval for reports.

void OpalRTPSession::SetRxStatisticsInterval | ( | unsigned | packets | ) |

Set the interval for receiver statistics in the session.

Parameters:

  packets | Number of packets between callbacks

void OpalRTPSession::SetToolName | ( | const PString & | name | ) |

Set the tool name for the RTP session.

void OpalRTPSession::SetTxStatisticsInterval | ( | unsigned | packets | ) |

Set the interval for transmitter statistics in the session.

Parameters:

  packets | Number of packets between callbacks

virtual bool OpalRTPSession::Shutdown | ( | bool | reading | ) | `[virtual]`

virtual int OpalRTPSession::WaitForPDU | ( | PUDPSocket & | dataSocket,
|  | PUDPSocket & | controlSocket,
|  | const PTimeInterval & | timer |
| ) |  |  | `[protected, virtual]`

virtual bool OpalRTPSession::WriteControl | ( | RTP_ControlFrame & | frame | ) | `[virtual]`

Write a control frame from the RTP channel.

Parameters:

  frame | Frame to write to the RTP session

virtual bool OpalRTPSession::WriteData | ( | RTP_DataFrame & | frame | ) | `[virtual]`

Write a data frame from the RTP channel.

Parameters:

  frame | Frame to write to the RTP session

virtual bool OpalRTPSession::WriteDataOrControlPDU | ( | const BYTE * | framePtr,
|  | PINDEX | frameSize,
|  | bool | toDataChannel |
| ) |  |  | `[protected, virtual]`

virtual bool OpalRTPSession::WriteOOBData | ( | RTP_DataFrame & | frame,
|  | bool | rewriteTimeStamp = `true` |
| ) |  |  | `[virtual]`

Write data frame to the RTP channel outside the normal stream of media Used for RFC2833 packets

## Friends And Related Function Documentation

friend class RTP_JitterBuffer`[friend]`

## Field Documentation

bool OpalRTPSession::allowAnySyncSource `[protected]`

bool OpalRTPSession::allowOneSyncSourceChange `[protected]`

bool OpalRTPSession::allowRemoteTransmitAddressChange `[protected]`

bool OpalRTPSession::allowSequenceChange `[protected]`

DWORD OpalRTPSession::averageReceiveTime `[protected]`

DWORD OpalRTPSession::averageReceiveTimeAccum `[protected]`

DWORD OpalRTPSession::averageSendTime `[protected]`

DWORD OpalRTPSession::averageSendTimeAccum `[protected]`

unsigned OpalRTPSession::consecutiveOutOfOrderPackets `[protected]`

PTimeInterval OpalRTPSession::delaySinceLastSR `[protected]`

WORD OpalRTPSession::expectedSequenceNumber `[protected]`

PTime OpalRTPSession::firstPacketReceived `[protected]`

PTime OpalRTPSession::firstPacketSent `[protected]`

bool OpalRTPSession::ignorePayloadTypeChanges `[protected]`

DWORD OpalRTPSession::jitterLevel `[protected]`

DWORD OpalRTPSession::jitterLevelOnRemote `[protected]`

PTimeInterval OpalRTPSession::lastReceivedPacketTime `[protected]`

RTP_DataFrame::PayloadTypes OpalRTPSession::lastReceivedPayloadType `[protected]`

WORD OpalRTPSession::lastRRSequenceNumber `[protected]`

PTimeInterval OpalRTPSession::lastSentPacketTime `[protected]`

WORD OpalRTPSession::lastSentSequenceNumber `[protected]`

DWORD OpalRTPSession::lastSentTimestamp `[protected]`

PTime OpalRTPSession::lastSRReceiveTime `[protected]`

PTime OpalRTPSession::lastSRTimestamp `[protected]`

DWORD OpalRTPSession::lastTransitTime `[protected]`

bool OpalRTPSession::m_byeSent `[protected]`

PString OpalRTPSession::m_canonicalName `[protected]`

bool OpalRTPSession::m_closeOnBye `[protected]`

PUDPSocket* OpalRTPSession::m_controlSocket `[protected]`

PMutex OpalRTPSession::m_dataMutex `[protected]`

PUDPSocket* OpalRTPSession::m_dataSocket `[protected]`

RTPExtensionHeaders OpalRTPSession::m_extensionHeaders `[protected]`

list<FilterNotifier> OpalRTPSession::m_filters `[protected]`

bool OpalRTPSession::m_firstControl `[protected]`

bool OpalRTPSession::m_isAudio `[protected]`

JitterBufferPtr OpalRTPSession::m_jitterBuffer `[protected]`

DWORD OpalRTPSession::m_lastReceivedStatisticTimestamp `[protected]`

PIPSocket::Address OpalRTPSession::m_localAddress `[protected]`

WORD OpalRTPSession::m_localControlPort `[protected]`

WORD OpalRTPSession::m_localDataPort `[protected]`

bool OpalRTPSession::m_localHasRestrictedNAT `[protected]`

PTimeInterval OpalRTPSession::m_maxNoReceiveTime `[protected]`

PTimeInterval OpalRTPSession::m_maxNoTransmitTime `[protected]`

DWORD OpalRTPSession::m_noTransmitErrors `[protected]`

PSimpleTimer OpalRTPSession::m_noTransmitTimer `[protected]`

std::list<RTP_DataFrame> OpalRTPSession::m_outOfOrderPackets `[protected]`

PIPSocket::Address OpalRTPSession::m_remoteAddress `[protected]`

bool OpalRTPSession::m_remoteBehindNAT `[protected]`

WORD OpalRTPSession::m_remoteControlPort `[protected]`

WORD OpalRTPSession::m_remoteDataPort `[protected]`

PIPSocket::Address OpalRTPSession::m_remoteTransmitAddress `[protected]`

PMutex OpalRTPSession::m_reportMutex `[protected]`

PTimer OpalRTPSession::m_reportTimer `[protected]`

bool OpalRTPSession::m_shutdownRead `[protected]`

bool OpalRTPSession::m_shutdownWrite `[protected]`

PTime OpalRTPSession::m_syncRealTime `[protected]`

DWORD OpalRTPSession::m_syncTimestamp `[protected]`

unsigned OpalRTPSession::m_timeUnits `[protected]`

PString OpalRTPSession::m_toolName `[protected]`

DWORD OpalRTPSession::markerRecvCount `[protected]`

DWORD OpalRTPSession::markerSendCount `[protected]`

DWORD OpalRTPSession::maximumJitterLevel `[protected]`

DWORD OpalRTPSession::maximumReceiveTime `[protected]`

DWORD OpalRTPSession::maximumReceiveTimeAccum `[protected]`

DWORD OpalRTPSession::maximumSendTime `[protected]`

DWORD OpalRTPSession::maximumSendTimeAccum `[protected]`

DWORD OpalRTPSession::minimumReceiveTime `[protected]`

DWORD OpalRTPSession::minimumReceiveTimeAccum `[protected]`

DWORD OpalRTPSession::minimumSendTime `[protected]`

DWORD OpalRTPSession::minimumSendTimeAccum `[protected]`

DWORD OpalRTPSession::octetsReceived `[protected]`

DWORD OpalRTPSession::octetsSent `[protected]`

PTimeInterval OpalRTPSession::oobTimeStampBase `[protected]`

bool OpalRTPSession::oobTimeStampBaseEstablished `[protected]`

DWORD OpalRTPSession::oobTimeStampOutBase `[protected]`

PTimeInterval OpalRTPSession::outOfOrderPacketTime `[protected]`

PTimeInterval OpalRTPSession::outOfOrderWaitTime `[protected]`

DWORD OpalRTPSession::packetsLost `[protected]`

DWORD OpalRTPSession::packetsLostByRemote `[protected]`

DWORD OpalRTPSession::packetsLostSinceLastRR `[protected]`

DWORD OpalRTPSession::packetsOutOfOrder `[protected]`

DWORD OpalRTPSession::packetsReceived `[protected]`

DWORD OpalRTPSession::packetsSent `[protected]`

bool OpalRTPSession::resequenceOutOfOrderPackets `[protected]`

DWORD OpalRTPSession::rtcpPacketsSent `[protected]`

unsigned OpalRTPSession::rxStatisticsCount `[protected]`

unsigned OpalRTPSession::rxStatisticsInterval `[protected]`

DWORD OpalRTPSession::senderReportsReceived `[protected]`

DWORD OpalRTPSession::syncSourceIn `[protected]`

DWORD OpalRTPSession::syncSourceOut `[protected]`

DWORD OpalRTPSession::timeStampOffs `[protected]`

unsigned OpalRTPSession::txStatisticsCount `[protected]`

unsigned OpalRTPSession::txStatisticsInterval `[protected]`

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

- rtp_session.h