#include <rtp.h>
Inheritance diagram for RTP_Session:
RTP_Session::RTP_Session | ( | PHandleAggregator * | aggregator, | |
unsigned | id, | |||
RTP_UserData * | userData = NULL , |
|||
BOOL | autoDeleteUserData = TRUE | |||
) |
Create a new RTP session.
aggregator | RTP aggregator |
id | Session ID for RTP channel |
userData | Optional data for session. |
autoDeleteUserData | Delete optional data with session. |
RTP_Session::~RTP_Session | ( | ) |
Delete a session. This deletes the userData field if autoDeleteUserData is TRUE.
RTP_Session::RTP_Session | ( | PHandleAggregator * | aggregator, | |
unsigned | id, | |||
RTP_UserData * | userData = NULL , |
|||
BOOL | autoDeleteUserData = TRUE | |||
) |
Create a new RTP session.
aggregator | RTP aggregator |
id | Session ID for RTP channel |
userData | Optional data for session. |
autoDeleteUserData | Delete optional data with session. |
RTP_Session::~RTP_Session | ( | ) |
Delete a session. This deletes the userData field if autoDeleteUserData is TRUE.
void RTP_Session::SetJitterBufferSize | ( | unsigned | minJitterDelay, | |
unsigned | maxJitterDelay, | |||
unsigned | timeUnits = 8 , |
|||
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 |
timeUnits | Time 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.
unsigned RTP_Session::GetJitterTimeUnits | ( | ) | const |
Get current time units of the jitter buffer.
virtual BOOL RTP_Session::ModifyQOS | ( | RTP_QOS * | ) | [inline, virtual] |
Modifies the QOS specifications for this RTP session
Reimplemented in RTP_UDP.
virtual BOOL RTP_Session::ReadBufferedData | ( | DWORD | timestamp, | |
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. 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, | |
BOOL | loop | |||
) | [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 |
loop | If TRUE, loop as long as data is available, if FALSE, only process once |
Implemented in RTP_UDP, and T38PseudoRTP.
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, and T38PseudoRTP.
virtual BOOL RTP_Session::WriteOOBData | ( | RTP_DataFrame & | frame | ) | [virtual] |
Write data frame to the RTP channel outside the normal stream of media Used for RFC2833 packets
Reimplemented 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 void RTP_Session::Reopen | ( | BOOL | isReading | ) | [pure virtual] |
Reopens an existing session in the given direction.
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] |
Reimplemented in T38PseudoRTP.
virtual SendReceiveStatus RTP_Session::OnSendControl | ( | RTP_ControlFrame & | frame, | |
PINDEX & | len | |||
) | [virtual] |
Reimplemented in T38PseudoRTP.
virtual SendReceiveStatus RTP_Session::OnReceiveData | ( | RTP_DataFrame & | frame | ) | [virtual] |
Reimplemented in T38PseudoRTP.
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.
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.
void RTP_Session::SetUserData | ( | RTP_UserData * | data, | |
BOOL | autoDeleteUserData = TRUE | |||
) |
Set the user data for the session.
data | New user data to be used |
autoDeleteUserData | Delete optional data with session. |
DWORD RTP_Session::GetSyncSourceOut | ( | ) | const [inline] |
Get the source output identifier.
void RTP_Session::IncrementReference | ( | ) | [inline] |
Increment reference count for RTP session.
BOOL RTP_Session::DecrementReference | ( | ) | [inline] |
Decrement reference count for RTP session.
BOOL RTP_Session::WillIgnoreOtherSources | ( | ) | const [inline] |
Indicate if will ignore all but first received SSRC value.
void RTP_Session::SetIgnoreOtherSources | ( | BOOL | ignore | ) | [inline] |
Indicate if will ignore all but first received SSRC value.
ignore | Flag for ignore other SSRC values |
BOOL RTP_Session::WillIgnoreOutOfOrderPackets | ( | ) | const [inline] |
Indicate if will ignore out of order packets.
void RTP_Session::SetIgnoreOutOfOrderPackets | ( | BOOL | ignore | ) | [inline] |
Indicate if will ignore out of order packets.
ignore | Flag for ignore out of order packets |
void RTP_Session::SetIgnorePayloadTypeChanges | ( | BOOL | ignore | ) | [inline] |
Indicate if will ignore rtp payload type changes in received packets.
ignore | Flag to ignore payload type changes |
const PTimeInterval& RTP_Session::GetReportTimeInterval | ( | ) | [inline] |
Get the time interval for sending RTCP reports in the session.
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. |
PTimeInterval RTP_Session::GetReportTimer | ( | ) | [inline] |
Get the current report timer
unsigned RTP_Session::GetTxStatisticsInterval | ( | ) | [inline] |
Get the interval for transmitter statistics in the session.
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.
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.
DWORD RTP_Session::GetOctetsSent | ( | ) | const [inline] |
Get total number of octets sent in session.
DWORD RTP_Session::GetPacketsReceived | ( | ) | const [inline] |
Get total number of packets received in session.
DWORD RTP_Session::GetOctetsReceived | ( | ) | const [inline] |
Get total number of octets received in session.
DWORD RTP_Session::GetPacketsLost | ( | ) | const [inline] |
Get total number received packets lost in session.
DWORD RTP_Session::GetPacketsOutOfOrder | ( | ) | const [inline] |
Get total number of packets received out of order in session.
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.
DWORD RTP_Session::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 RTP_Session::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 RTP_Session::GetMaximumSendTime | ( | ) | const [inline] |
Get maximum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
DWORD RTP_Session::GetMinimumSendTime | ( | ) | const [inline] |
Get minimum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
DWORD RTP_Session::GetAverageReceiveTime | ( | ) | const [inline] |
Get average time between received packets. This is averaged over the last rxStatisticsInterval packets and is in milliseconds.
DWORD RTP_Session::GetMaximumReceiveTime | ( | ) | const [inline] |
Get maximum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
DWORD RTP_Session::GetMinimumReceiveTime | ( | ) | const [inline] |
Get minimum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
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.
DWORD RTP_Session::GetMaxJitterTime | ( | ) | const [inline] |
Get averaged jitter time for received packets. This is the maximum value of jitterLevel for the session.
virtual int RTP_Session::GetDataSocketHandle | ( | ) | const [inline, virtual] |
Reimplemented in RTP_UDP.
virtual int RTP_Session::GetControlSocketHandle | ( | ) | const [inline, virtual] |
Reimplemented in RTP_UDP.
virtual void RTP_Session::SendBYE | ( | ) | [virtual] |
virtual void RTP_Session::SetCloseOnBYE | ( | BOOL | v | ) | [inline, virtual] |
void RTP_Session::AddReceiverReport | ( | RTP_ControlFrame::ReceiverReport & | receiver | ) | [protected] |
BOOL RTP_Session::InsertReportPacket | ( | RTP_ControlFrame & | report | ) | [protected] |
unsigned RTP_Session::sessionID [protected] |
PString RTP_Session::canonicalName [protected] |
PString RTP_Session::toolName [protected] |
unsigned RTP_Session::referenceCount [protected] |
RTP_UserData* RTP_Session::userData [protected] |
BOOL RTP_Session::autoDeleteUserData [protected] |
RTP_JitterBuffer* RTP_Session::jitter [protected] |
BOOL RTP_Session::ignoreOtherSources [protected] |
BOOL RTP_Session::ignoreOutOfOrderPackets [protected] |
DWORD RTP_Session::syncSourceOut [protected] |
DWORD RTP_Session::syncSourceIn [protected] |
DWORD RTP_Session::lastSentTimestamp [protected] |
BOOL RTP_Session::allowSyncSourceInChange [protected] |
BOOL RTP_Session::allowRemoteTransmitAddressChange [protected] |
BOOL RTP_Session::allowSequenceChange [protected] |
PTimeInterval RTP_Session::reportTimeInterval [protected] |
unsigned RTP_Session::txStatisticsInterval [protected] |
unsigned RTP_Session::rxStatisticsInterval [protected] |
WORD RTP_Session::lastSentSequenceNumber [protected] |
WORD RTP_Session::expectedSequenceNumber [protected] |
PTimeInterval RTP_Session::lastSentPacketTime [protected] |
PTimeInterval RTP_Session::lastReceivedPacketTime [protected] |
WORD RTP_Session::lastRRSequenceNumber [protected] |
PINDEX RTP_Session::consecutiveOutOfOrderPackets [protected] |
PMutex RTP_Session::sendDataMutex [protected] |
DWORD RTP_Session::timeStampOut [protected] |
DWORD RTP_Session::timeStampOffs [protected] |
BOOL RTP_Session::timeStampOffsetEstablished [protected] |
BOOL RTP_Session::timeStampIsPremedia [protected] |
DWORD RTP_Session::packetsSent [protected] |
DWORD RTP_Session::rtcpPacketsSent [protected] |
DWORD RTP_Session::octetsSent [protected] |
DWORD RTP_Session::packetsReceived [protected] |
DWORD RTP_Session::octetsReceived [protected] |
DWORD RTP_Session::packetsLost [protected] |
DWORD RTP_Session::packetsOutOfOrder [protected] |
DWORD RTP_Session::averageSendTime [protected] |
DWORD RTP_Session::maximumSendTime [protected] |
DWORD RTP_Session::minimumSendTime [protected] |
DWORD RTP_Session::averageReceiveTime [protected] |
DWORD RTP_Session::maximumReceiveTime [protected] |
DWORD RTP_Session::minimumReceiveTime [protected] |
DWORD RTP_Session::jitterLevel [protected] |
DWORD RTP_Session::maximumJitterLevel [protected] |
DWORD RTP_Session::markerSendCount [protected] |
DWORD RTP_Session::markerRecvCount [protected] |
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] |
BOOL RTP_Session::ignorePayloadTypeChanges [protected] |
PMutex RTP_Session::reportMutex [protected] |
PTimer RTP_Session::reportTimer [protected] |
PHandleAggregator* RTP_Session::aggregator [protected] |
BOOL RTP_Session::closeOnBye [protected] |
BOOL RTP_Session::byeSent [protected] |