#include <rtp.h>
Inheritance diagram for RTP_Session:
typedef PSafePtr<RTP_JitterBuffer, PSafePtrMultiThreaded> RTP_Session::JitterBufferPtr [protected] |
RTP_Session::RTP_Session | ( | const Params & | options | ) |
Create a new RTP session.
options | Parameters to construct with session. |
RTP_Session::~RTP_Session | ( | ) |
Delete a session. This deletes the userData field if autoDeleteUserData is PTrue.
RTP_Session::RTP_Session | ( | const Params & | options | ) |
Create a new RTP session.
options | Parameters to construct with session. |
RTP_Session::~RTP_Session | ( | ) |
Delete a session. This deletes the userData field if autoDeleteUserData is PTrue.
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 PBoolean RTP_Session::ModifyQOS | ( | RTP_QOS * | ) | [inline, virtual] |
Modifies the QOS specifications for this RTP session
Reimplemented in RTP_UDP.
virtual PBoolean RTP_Session::ReadBufferedData | ( | 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().
frame | Frame read from the RTP session |
virtual PBoolean RTP_Session::ReadData | ( | RTP_DataFrame & | frame, | |
PBoolean | 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 PTrue, loop as long as data is available, if PFalse, only process once |
Implemented in RTP_UDP.
virtual PBoolean 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 PBoolean RTP_Session::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
Reimplemented in RTP_UDP.
virtual PBoolean 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 PBoolean RTP_Session::SendReport | ( | ) | [virtual] |
Write the RTCP reports.
virtual void RTP_Session::Close | ( | PBoolean | 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 | ( | PBoolean | 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] |
virtual SendReceiveStatus RTP_Session::Internal_OnSendData | ( | RTP_DataFrame & | frame | ) | [virtual] |
virtual SendReceiveStatus RTP_Session::OnSendControl | ( | RTP_ControlFrame & | frame, | |
PINDEX & | len | |||
) | [virtual] |
virtual SendReceiveStatus RTP_Session::Internal_OnSendControl | ( | RTP_ControlFrame & | frame, | |
PINDEX & | len | |||
) | [virtual] |
virtual SendReceiveStatus RTP_Session::OnReceiveData | ( | RTP_DataFrame & | frame | ) | [virtual] |
virtual SendReceiveStatus RTP_Session::Internal_OnReceiveData | ( | 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.
bool RTP_Session::IsAudio | ( | ) | const [inline] |
Get flag for is audio RTP.
void RTP_Session::SetAudio | ( | bool | aud | ) | [inline] |
Set flag for RTP session is audio.
aud | New audio indication flag |
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, | |
PBoolean | autoDeleteUserData = PTrue | |||
) |
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.
bool RTP_Session::AllowAnySyncSource | ( | ) | const [inline] |
Indicate if will ignore all but first received SSRC value.
void RTP_Session::SetAnySyncSource | ( | bool | allow | ) | [inline] |
Indicate if will ignore all but first received SSRC value.
allow | Flag for allow any SSRC values |
PBoolean RTP_Session::WillIgnoreOutOfOrderPackets | ( | ) | const [inline] |
Indicate if will ignore out of order packets.
void RTP_Session::SetIgnoreOutOfOrderPackets | ( | PBoolean | ignore | ) | [inline] |
Indicate if will ignore out of order packets.
ignore | Flag for ignore out of order packets |
void RTP_Session::SetIgnorePayloadTypeChanges | ( | PBoolean | 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 |
void RTP_Session::ClearStatistics | ( | ) |
Clear statistics
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::GetPacketOverruns | ( | ) | const |
Get total number received packets that could not fit into the 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::SetCloseOnBYE | ( | PBoolean | v | ) | [inline, virtual] |
virtual void RTP_Session::SendIntraFrameRequest | ( | ) | [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.
void RTP_Session::SetNextSentSequenceNumber | ( | WORD | num | ) | [inline] |
virtual PString RTP_Session::GetEncoding | ( | ) | const [inline, virtual] |
virtual void RTP_Session::SetEncoding | ( | const PString & | newEncoding | ) | [virtual] |
DWORD RTP_Session::GetSyncSourceIn | ( | ) | const [inline] |
void RTP_Session::SetFailed | ( | bool | v | ) | [inline] |
bool RTP_Session::HasFailed | ( | ) | const [inline] |
void RTP_Session::AddFilter | ( | const PNotifier & | filter | ) |
virtual void RTP_Session::SendBYE | ( | ) | [protected, virtual] |
void RTP_Session::AddReceiverReport | ( | RTP_ControlFrame::ReceiverReport & | receiver | ) | [protected] |
PBoolean RTP_Session::InsertReportPacket | ( | RTP_ControlFrame & | report | ) | [protected] |
friend class EncodingLock [friend] |
PString RTP_Session::m_encoding [protected] |
PMutex RTP_Session::m_encodingMutex [protected] |
RTP_Encoding* RTP_Session::m_encodingHandler [protected] |
unsigned RTP_Session::sessionID [protected] |
bool RTP_Session::isAudio [protected] |
PString RTP_Session::canonicalName [protected] |
PString RTP_Session::toolName [protected] |
RTP_UserData* RTP_Session::userData [protected] |
PBoolean RTP_Session::autoDeleteUserData [protected] |
JitterBufferPtr RTP_Session::m_jitterBuffer [protected] |
PBoolean RTP_Session::ignoreOutOfOrderPackets [protected] |
DWORD RTP_Session::syncSourceOut [protected] |
DWORD RTP_Session::syncSourceIn [protected] |
DWORD RTP_Session::lastSentTimestamp [protected] |
bool RTP_Session::allowAnySyncSource [protected] |
bool RTP_Session::allowOneSyncSourceChange [protected] |
PBoolean RTP_Session::allowRemoteTransmitAddressChange [protected] |
PBoolean 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::dataMutex [protected] |
DWORD RTP_Session::timeStampOffs [protected] |
PBoolean RTP_Session::oobTimeStampBaseEstablished [protected] |
DWORD RTP_Session::oobTimeStampOutBase [protected] |
PTimeInterval RTP_Session::oobTimeStampBase [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] |
PBoolean RTP_Session::ignorePayloadTypeChanges [protected] |
PMutex RTP_Session::reportMutex [protected] |
PTimer RTP_Session::reportTimer [protected] |
PBoolean RTP_Session::closeOnBye [protected] |
PBoolean RTP_Session::byeSent [protected] |
bool RTP_Session::failed [protected] |
set to true if session has received too many ICMP destination unreachable
PList<Filter> RTP_Session::filters [protected] |