#include <rtp_session.h>
Inheritance diagram for OpalRTPSession:
typedef PNotifierTemplate<SendReceiveStatus &> OpalRTPSession::FilterNotifier |
typedef PSafePtr<OpalJitterBuffer, PSafePtrMultiThreaded> OpalRTPSession::JitterBufferPtr [protected] |
OpalRTPSession::OpalRTPSession | ( | const Init & | init | ) |
Create a new RTP session.
OpalRTPSession::~OpalRTPSession | ( | ) |
Delete a session. This deletes the userData field if autoDeleteUserData is true.
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.
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.
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.
allow | Flag for allow any SSRC values |
void OpalRTPSession::SetAudio | ( | bool | aud | ) | [inline] |
Set flag for RTP session is audio.
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.
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.
init | Initialisation information |
void OpalRTPSession::SetMaxNoReceiveTime | ( | const PTimeInterval & | interval | ) | [inline] |
Set the maximum time we wait for packets from remote.
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.
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.
interval | New time interval for reports. |
void OpalRTPSession::SetRxStatisticsInterval | ( | unsigned | packets | ) |
Set the interval for receiver statistics in the session.
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.
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.
frame | Frame to write to the RTP session |
virtual bool OpalRTPSession::WriteData | ( | RTP_DataFrame & | frame | ) | [virtual] |
Write a data frame from the RTP channel.
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
friend class RTP_JitterBuffer [friend] |
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] |
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] |
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] |