#include <rtp.h>
RTP_Session::RTP_Session | ( | unsigned | id, | |
RTP_UserData * | userData = NULL | |||
) |
Create a new RTP session.
id | Session ID for RTP channel |
userData | Optional data for session. |
RTP_Session::~RTP_Session | ( | ) |
Delete a session. This deletes the userData field.
void RTP_Session::SetJitterBufferSize | ( | unsigned | minJitterDelay, | |
unsigned | maxJitterDelay, | |||
PINDEX | stackSize = 30000 | |||
) |
Sets the size of the jitter buffer to be used by this RTP session. A session default to not having any jitter buffer enabled for reading and the ReadBufferedData() function simply calls ReadData(). Once a jitter buffer has been created it cannot be removed, though its size may be adjusted.
If the jitterDelay paramter is zero, it destroys the jitter buffer attached to this RTP session.
minJitterDelay | Minimum jitter buffer delay in RTP timestamp units |
maxJitterDelay | Maximum jitter buffer delay in RTP timestamp units |
stackSize | Stack size for jitter thread |
unsigned RTP_Session::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.
virtual BOOL RTP_Session::ModifyQOS | ( | RTP_QOS * | ) | [inline, virtual] |
Modifies the QOS specifications for this RTP session
Reimplemented in RTP_UDP.
BOOL RTP_Session::ReadBufferedData | ( | DWORD | timestamp, | |
RTP_DataFrame & | frame | |||
) |
Read a data frame from the RTP channel. This function will conditionally read data from eth jitter buffer or directly if there is no jitter buffer enabled. An application should generally use this in preference to directly calling ReadData().
timestamp | Timestamp to read from buffer. |
frame | Frame read from the RTP session |
virtual BOOL RTP_Session::ReadData | ( | RTP_DataFrame & | frame | ) | [pure virtual] |
Read a data frame from the RTP channel. Any control frames received are dispatched to callbacks and are not returned by this function. It will block until a data frame is available or an error occurs.
frame | Frame read from the RTP session |
Implemented in RTP_UDP.
virtual BOOL RTP_Session::WriteData | ( | RTP_DataFrame & | frame | ) | [pure virtual] |
Write a data frame from the RTP channel.
frame | Frame to write to the RTP session |
Implemented in RTP_UDP.
virtual BOOL RTP_Session::WriteControl | ( | RTP_ControlFrame & | frame | ) | [pure virtual] |
Write a control frame from the RTP channel.
frame | Frame to write to the RTP session |
Implemented in RTP_UDP.
virtual BOOL RTP_Session::SendReport | ( | ) | [virtual] |
Write the RTCP reports.
virtual void RTP_Session::Close | ( | BOOL | reading | ) | [pure virtual] |
Close down the RTP session.
reading | Closing the read side of the session |
Implemented in RTP_UDP.
virtual PString RTP_Session::GetLocalHostName | ( | ) | [pure virtual] |
Get the local host name as used in SDES packes.
Implemented in RTP_UDP.
virtual SendReceiveStatus RTP_Session::OnSendData | ( | RTP_DataFrame & | frame | ) | [virtual] |
virtual SendReceiveStatus RTP_Session::OnReceiveData | ( | const RTP_DataFrame & | frame | ) | [virtual] |
virtual SendReceiveStatus RTP_Session::OnReceiveControl | ( | RTP_ControlFrame & | frame | ) | [virtual] |
RTP_Session::PARRAY | ( | ReceiverReportArray | , | |
ReceiverReport | ||||
) |
virtual void RTP_Session::OnRxSenderReport | ( | const SenderReport & | sender, | |
const ReceiverReportArray & | reports | |||
) | [virtual] |
virtual void RTP_Session::OnRxReceiverReport | ( | DWORD | src, | |
const ReceiverReportArray & | reports | |||
) | [virtual] |
RTP_Session::PARRAY | ( | SourceDescriptionArray | , | |
SourceDescription | ||||
) |
virtual void RTP_Session::OnRxSourceDescription | ( | const SourceDescriptionArray & | descriptions | ) | [virtual] |
virtual void RTP_Session::OnRxGoodbye | ( | const PDWORDArray & | sources, | |
const PString & | reason | |||
) | [virtual] |
virtual void RTP_Session::OnRxApplDefined | ( | const PString & | type, | |
unsigned | subtype, | |||
DWORD | src, | |||
const BYTE * | data, | |||
PINDEX | size | |||
) | [virtual] |
unsigned RTP_Session::GetSessionID | ( | ) | const [inline] |
Get the ID for the RTP session.
References sessionID.
PString RTP_Session::GetCanonicalName | ( | ) | const |
Get the canonical name for the RTP session.
void RTP_Session::SetCanonicalName | ( | const PString & | name | ) |
Set the canonical name for the RTP session.
PString RTP_Session::GetToolName | ( | ) | const |
Get the tool name for the RTP session.
void RTP_Session::SetToolName | ( | const PString & | name | ) |
Set the tool name for the RTP session.
RTP_UserData* RTP_Session::GetUserData | ( | ) | const [inline] |
Get the user data for the session.
References userData.
void RTP_Session::SetUserData | ( | RTP_UserData * | data | ) |
Set the user data for the session.
data | New user data to be used |
DWORD RTP_Session::GetSyncSourceOut | ( | ) | const [inline] |
Get the source output identifier.
References syncSourceOut.
void RTP_Session::IncrementReference | ( | ) | [inline] |
Increment reference count for RTP session.
References referenceCount.
BOOL RTP_Session::DecrementReference | ( | ) | [inline] |
Decrement reference count for RTP session.
References referenceCount.
BOOL RTP_Session::WillIgnoreOtherSources | ( | ) | const [inline] |
Indicate if will ignore all but first received SSRC value.
References ignoreOtherSources.
void RTP_Session::SetIgnoreOtherSources | ( | BOOL | ignore | ) | [inline] |
Indicate if will ignore all but first received SSRC value.
ignore | Flag for ignore other SSRC values |
References ignoreOtherSources.
BOOL RTP_Session::WillIgnoreOutOfOrderPackets | ( | ) | const [inline] |
Indicate if will ignore out of order packets.
References ignoreOutOfOrderPackets.
void RTP_Session::SetIgnoreOutOfOrderPackets | ( | BOOL | ignore | ) | [inline] |
Indicate if will ignore out of order packets.
ignore | Flag for ignore out of order packets |
References ignoreOutOfOrderPackets.
const PTimeInterval& RTP_Session::GetReportTimeInterval | ( | ) | [inline] |
Get the time interval for sending RTCP reports in the session.
References reportTimeInterval.
void RTP_Session::SetReportTimeInterval | ( | const PTimeInterval & | interval | ) | [inline] |
Set the time interval for sending RTCP reports in the session.
interval | New time interval for reports. |
References reportTimeInterval.
unsigned RTP_Session::GetTxStatisticsInterval | ( | ) | [inline] |
Get the interval for transmitter statistics in the session.
References txStatisticsInterval.
void RTP_Session::SetTxStatisticsInterval | ( | unsigned | packets | ) |
Set the interval for transmitter statistics in the session.
packets | Number of packets between callbacks |
unsigned RTP_Session::GetRxStatisticsInterval | ( | ) | [inline] |
Get the interval for receiver statistics in the session.
References rxStatisticsInterval.
void RTP_Session::SetRxStatisticsInterval | ( | unsigned | packets | ) |
Set the interval for receiver statistics in the session.
packets | Number of packets between callbacks |
DWORD RTP_Session::GetPacketsSent | ( | ) | const [inline] |
Get total number of packets sent in session.
References packetsSent.
DWORD RTP_Session::GetOctetsSent | ( | ) | const [inline] |
Get total number of octets sent in session.
References octetsSent.
DWORD RTP_Session::GetPacketsReceived | ( | ) | const [inline] |
Get total number of packets received in session.
References packetsReceived.
DWORD RTP_Session::GetOctetsReceived | ( | ) | const [inline] |
Get total number of octets received in session.
References octetsReceived.
DWORD RTP_Session::GetPacketsLost | ( | ) | const [inline] |
Get total number received packets lost in session.
References packetsLost.
DWORD RTP_Session::GetPacketsOutOfOrder | ( | ) | const [inline] |
Get total number of packets received out of order in session.
References packetsOutOfOrder.
DWORD RTP_Session::GetPacketsTooLate | ( | ) | const |
Get total number received packets too late to go into jitter buffer.
DWORD RTP_Session::GetAverageSendTime | ( | ) | const [inline] |
Get average time between sent packets. This is averaged over the last txStatisticsInterval packets and is in milliseconds.
References averageSendTime.
DWORD RTP_Session::GetMaximumSendTime | ( | ) | const [inline] |
Get maximum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
References maximumSendTime.
DWORD RTP_Session::GetMinimumSendTime | ( | ) | const [inline] |
Get minimum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
References minimumSendTime.
DWORD RTP_Session::GetAverageReceiveTime | ( | ) | const [inline] |
Get average time between received packets. This is averaged over the last rxStatisticsInterval packets and is in milliseconds.
References averageReceiveTime.
DWORD RTP_Session::GetMaximumReceiveTime | ( | ) | const [inline] |
Get maximum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
References maximumReceiveTime.
DWORD RTP_Session::GetMinimumReceiveTime | ( | ) | const [inline] |
Get minimum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
References minimumReceiveTime.
DWORD RTP_Session::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.
References jitterLevel.
DWORD RTP_Session::GetMaxJitterTime | ( | ) | const [inline] |
Get averaged jitter time for received packets. This is the maximum value of jitterLevel for the session.
References maximumJitterLevel.
PTime RTP_Session::GetFirstDataReceivedTime | ( | ) | const [inline] |
return the timestamp at which the first packet of RTP data was received
References firstDataReceivedTime.
void RTP_Session::AddReceiverReport | ( | RTP_ControlFrame::ReceiverReport & | receiver | ) | [protected] |
unsigned RTP_Session::sessionID [protected] |
Referenced by GetSessionID().
PString RTP_Session::canonicalName [protected] |
PString RTP_Session::toolName [protected] |
unsigned RTP_Session::referenceCount [protected] |
Referenced by DecrementReference(), and IncrementReference().
RTP_UserData* RTP_Session::userData [protected] |
Referenced by GetUserData().
RTP_JitterBuffer* RTP_Session::jitter [protected] |
BOOL RTP_Session::ignoreOtherSources [protected] |
Referenced by SetIgnoreOtherSources(), and WillIgnoreOtherSources().
BOOL RTP_Session::ignoreOutOfOrderPackets [protected] |
Referenced by SetIgnoreOutOfOrderPackets(), and WillIgnoreOutOfOrderPackets().
DWORD RTP_Session::syncSourceOut [protected] |
Referenced by GetSyncSourceOut().
DWORD RTP_Session::syncSourceIn [protected] |
PTimeInterval RTP_Session::reportTimeInterval [protected] |
Referenced by GetReportTimeInterval(), and SetReportTimeInterval().
unsigned RTP_Session::txStatisticsInterval [protected] |
Referenced by GetTxStatisticsInterval().
unsigned RTP_Session::rxStatisticsInterval [protected] |
Referenced by GetRxStatisticsInterval().
WORD RTP_Session::lastSentSequenceNumber [protected] |
WORD RTP_Session::expectedSequenceNumber [protected] |
DWORD RTP_Session::lastSentTimestamp [protected] |
PTimeInterval RTP_Session::lastSentPacketTime [protected] |
PTimeInterval RTP_Session::lastReceivedPacketTime [protected] |
WORD RTP_Session::lastRRSequenceNumber [protected] |
PINDEX RTP_Session::consecutiveOutOfOrderPackets [protected] |
DWORD RTP_Session::packetsSent [protected] |
Referenced by GetPacketsSent().
DWORD RTP_Session::octetsSent [protected] |
Referenced by GetOctetsSent().
DWORD RTP_Session::packetsReceived [protected] |
Referenced by GetPacketsReceived().
DWORD RTP_Session::octetsReceived [protected] |
Referenced by GetOctetsReceived().
DWORD RTP_Session::packetsLost [protected] |
Referenced by GetPacketsLost().
DWORD RTP_Session::packetsOutOfOrder [protected] |
Referenced by GetPacketsOutOfOrder().
DWORD RTP_Session::averageSendTime [protected] |
Referenced by GetAverageSendTime().
DWORD RTP_Session::maximumSendTime [protected] |
Referenced by GetMaximumSendTime().
DWORD RTP_Session::minimumSendTime [protected] |
Referenced by GetMinimumSendTime().
DWORD RTP_Session::averageReceiveTime [protected] |
Referenced by GetAverageReceiveTime().
DWORD RTP_Session::maximumReceiveTime [protected] |
Referenced by GetMaximumReceiveTime().
DWORD RTP_Session::minimumReceiveTime [protected] |
Referenced by GetMinimumReceiveTime().
DWORD RTP_Session::jitterLevel [protected] |
Referenced by GetAvgJitterTime().
DWORD RTP_Session::maximumJitterLevel [protected] |
Referenced by GetMaxJitterTime().
unsigned RTP_Session::txStatisticsCount [protected] |
unsigned RTP_Session::rxStatisticsCount [protected] |
DWORD RTP_Session::averageSendTimeAccum [protected] |
DWORD RTP_Session::maximumSendTimeAccum [protected] |
DWORD RTP_Session::minimumSendTimeAccum [protected] |
DWORD RTP_Session::averageReceiveTimeAccum [protected] |
DWORD RTP_Session::maximumReceiveTimeAccum [protected] |
DWORD RTP_Session::minimumReceiveTimeAccum [protected] |
DWORD RTP_Session::packetsLostSinceLastRR [protected] |
DWORD RTP_Session::lastTransitTime [protected] |
PTime RTP_Session::firstDataReceivedTime [protected] |
Referenced by GetFirstDataReceivedTime().
PMutex RTP_Session::reportMutex [protected] |
PTimer RTP_Session::reportTimer [protected] |