OPAL
Version 3.10.10
|
#include <rtp.h>
Data Structures | |
class | EncodingLock |
struct | Params |
class | ReceiverReport |
class | SenderReport |
class | SourceDescription |
Public Types | |
typedef PNotifierTemplate < SendReceiveStatus & > | FilterNotifier |
Public Member Functions | |
virtual void | SetCloseOnBYE (PBoolean v) |
virtual void | SendIntraFrameRequest (bool rfc2032, bool pictureLoss) |
virtual void | SendTemporalSpatialTradeOff (unsigned tradeOff) |
void | SetNextSentSequenceNumber (WORD num) |
virtual PString | GetEncoding () const |
virtual void | SetEncoding (const PString &newEncoding) |
DWORD | GetSyncSourceIn () const |
void | SetFailed (bool v) |
bool | HasFailed () const |
void | AddFilter (const FilterNotifier &filter) |
virtual void | SendBYE () |
Construction | |
RTP_Session (const Params &options) | |
~RTP_Session () | |
Operations | |
void | SetJitterBufferSize (unsigned minJitterDelay, unsigned maxJitterDelay, unsigned timeUnits=0, PINDEX packetSize=2048) |
unsigned | GetJitterBufferSize () const |
unsigned | GetJitterBufferDelay () const |
unsigned | GetJitterTimeUnits () const |
virtual PBoolean | ModifyQOS (RTP_QOS *) |
virtual PBoolean | ReadBufferedData (RTP_DataFrame &frame) |
virtual PBoolean | ReadData (RTP_DataFrame &frame)=0 |
virtual void | FlushData () |
virtual PBoolean | WriteData (RTP_DataFrame &frame)=0 |
virtual PBoolean | WriteOOBData (RTP_DataFrame &frame, bool rewriteTimeStamp=true) |
virtual PBoolean | WriteControl (RTP_ControlFrame &frame)=0 |
virtual bool | Close (PBoolean reading)=0 |
virtual void | Reopen (PBoolean isReading)=0 |
virtual PString | GetLocalHostName ()=0 |
virtual void | GetStatistics (OpalMediaStatistics &statistics, bool receiver) const |
Protected Types | |
typedef PSafePtr < RTP_JitterBuffer, PSafePtrMultiThreaded > | JitterBufferPtr |
Protected Member Functions | |
RTP_Session::ReceiverReportArray | BuildReceiverReportArray (const RTP_ControlFrame &frame, PINDEX offset) |
void | AddReceiverReport (RTP_ControlFrame::ReceiverReport &receiver) |
PBoolean | InsertReportPacket (RTP_ControlFrame &report) |
void | SaveOutOfOrderPacket (RTP_DataFrame &frame) |
PDECLARE_NOTIFIER (PTimer, RTP_Session, SendReport) | |
Friends | |
class | EncodingLock |
Call back functions | |
enum | SendReceiveStatus { e_ProcessPacket, e_IgnorePacket, e_AbortTransport } |
virtual SendReceiveStatus | OnSendData (RTP_DataFrame &frame) |
virtual SendReceiveStatus | Internal_OnSendData (RTP_DataFrame &frame) |
virtual SendReceiveStatus | OnSendControl (RTP_ControlFrame &frame, PINDEX &len) |
virtual SendReceiveStatus | Internal_OnSendControl (RTP_ControlFrame &frame, PINDEX &len) |
virtual SendReceiveStatus | OnReceiveData (RTP_DataFrame &frame) |
virtual SendReceiveStatus | Internal_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 } |
unsigned | GetSessionID () const |
void | SetSessionID (unsigned id) |
bool | IsAudio () const |
void | SetAudio (bool aud) |
PString | GetCanonicalName () const |
void | SetCanonicalName (const PString &name) |
PString | GetToolName () const |
void | SetToolName (const PString &name) |
RTP_UserData * | GetUserData () const |
void | SetUserData (RTP_UserData *data, PBoolean autoDeleteUserData=true) |
DWORD | GetSyncSourceOut () const |
bool | AllowAnySyncSource () const |
void | SetAnySyncSource (bool allow) |
void | SetIgnorePayloadTypeChanges (PBoolean ignore) |
const PTimeInterval & | GetReportTimeInterval () |
void | SetReportTimeInterval (const PTimeInterval &interval) |
unsigned | GetTxStatisticsInterval () |
void | SetTxStatisticsInterval (unsigned packets) |
unsigned | GetRxStatisticsInterval () |
void | SetRxStatisticsInterval (unsigned packets) |
void | ClearStatistics () |
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 |
This class is for encpsulating the IETF Real Time Protocol interface.
typedef PNotifierTemplate<SendReceiveStatus &> RTP_Session::FilterNotifier |
|
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 true.
void RTP_Session::AddFilter | ( | const FilterNotifier & | filter) |
|
protected |
|
inline |
Indicate if will ignore all but first received SSRC value.
|
protected |
void RTP_Session::ClearStatistics | ( | ) |
Clear statistics
|
pure virtual |
Close down the RTP session.
reading | Closing the read side of the session |
Implemented in RTP_UDP.
|
virtual |
Flush incoming data.
Reimplemented in RTP_UDP.
|
inline |
Get average time between received packets. This is averaged over the last rxStatisticsInterval packets and is in milliseconds.
|
inline |
Get average time between sent packets. This is averaged over the last txStatisticsInterval packets and is in milliseconds.
|
inline |
Get averaged jitter time for received packets. This is the calculated statistical variance of the interarrival time of received packets in milliseconds.
PString RTP_Session::GetCanonicalName | ( | ) | const |
Get the canonical name for the RTP session.
|
inlinevirtual |
|
inline |
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.
|
inline |
Get jitter time for received packets on remote. This is the calculated statistical variance of the interarrival time of received packets in milliseconds.
|
inline |
Get current time units of the jitter buffer.
|
pure virtual |
Get the local host name as used in SDES packes.
Implemented in RTP_UDP.
|
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.
|
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.
|
inline |
Get maximum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
|
inline |
Get maximum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
|
inline |
Get averaged jitter time for received packets. This is the maximum value of jitterLevel for the session.
|
inline |
Get minimum time between received packets. This is over the last rxStatisticsInterval packets and is in milliseconds.
|
inline |
Get minimum time between sent packets. This is over the last txStatisticsInterval packets and is in milliseconds.
|
inline |
Get total number of octets received in session.
|
inline |
Get total number of octets sent in session.
DWORD RTP_Session::GetPacketOverruns | ( | ) | const |
Get total number received packets that could not fit into the jitter buffer.
|
inline |
Get total number received packets lost in session.
|
inline |
Get total number transmitted packets lost by remote in session. Determined via RTCP.
|
inline |
Get total number of packets received out of order in session.
|
inline |
Get total number of packets received in session.
Referenced by OpalRTPMediaSession::HasFailed().
|
inline |
Get total number of packets sent in session.
DWORD RTP_Session::GetPacketsTooLate | ( | ) | const |
Get total number received packets too late to go into jitter buffer.
|
inline |
Get the time interval for sending RTCP reports in the session.
|
inline |
Get the interval for receiver statistics in the session.
|
inline |
Get the ID for the RTP session.
|
virtual |
|
inline |
|
inline |
Get the source output identifier.
PString RTP_Session::GetToolName | ( | ) | const |
Get the tool name for the RTP session.
|
inline |
Get the interval for transmitter statistics in the session.
|
inline |
Get the user data for the session.
|
inline |
Referenced by OpalRTPMediaSession::HasFailed().
|
protected |
|
virtual |
|
virtual |
|
virtual |
|
inline |
Get flag for is audio RTP.
|
inlinevirtual |
Modifies the QOS specifications for this RTP session
Reimplemented in RTP_UDP.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
RTP_Session::PARRAY | ( | ReceiverReportArray | , |
ReceiverReport | |||
) |
RTP_Session::PARRAY | ( | SourceDescriptionArray | , |
SourceDescription | |||
) |
|
protected |
|
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 |
|
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.
|
pure virtual |
Reopens an existing session in the given direction.
Implemented in RTP_UDP.
|
protected |
|
virtual |
|
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 |
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.
|
inline |
Indicate if will ignore all but first received SSRC value.
allow | Flag for allow any SSRC values |
|
inline |
Set flag for RTP session is audio.
aud | New audio indication flag |
void RTP_Session::SetCanonicalName | ( | const PString & | name) |
Set the canonical name for the RTP session.
|
inlinevirtual |
|
virtual |
Reimplemented in RTP_UDP.
|
inline |
|
inline |
Indicate if will ignore rtp payload type changes in received packets.
ignore | Flag to ignore payload type changes |
void RTP_Session::SetJitterBufferSize | ( | unsigned | minJitterDelay, |
unsigned | maxJitterDelay, | ||
unsigned | timeUnits = 0 , |
||
PINDEX | packetSize = 2048 |
||
) |
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.
minJitterDelay | Minimum jitter buffer delay in RTP timestamp units |
maxJitterDelay | Maximum jitter buffer delay in RTP timestamp units |
timeUnits | Time Units, zero uses default |
packetSize | Receive RTP packet size |
|
inline |
|
inline |
Set the time interval for sending RTCP reports in the session.
interval | New time interval for reports. |
void RTP_Session::SetRxStatisticsInterval | ( | unsigned | packets) |
Set the interval for receiver statistics in the session.
packets | Number of packets between callbacks |
|
inline |
Set the ID for the RTP session.
void RTP_Session::SetToolName | ( | const PString & | name) |
Set the tool name for the RTP session.
void RTP_Session::SetTxStatisticsInterval | ( | unsigned | packets) |
Set the interval for transmitter statistics in the session.
packets | Number of packets between callbacks |
void RTP_Session::SetUserData | ( | RTP_UserData * | data, |
PBoolean | autoDeleteUserData = true |
||
) |
Set the user data for the session.
data | New user data to be used |
autoDeleteUserData | Delete optional data with session. |
|
pure virtual |
Write a control frame from the RTP channel.
frame | Frame to write to the RTP session |
Implemented in RTP_UDP.
|
pure virtual |
Write a data frame from the RTP channel.
frame | Frame to write to the RTP session |
Implemented in RTP_UDP.
|
virtual |
Write data frame to the RTP channel outside the normal stream of media Used for RFC2833 packets
Reimplemented in RTP_UDP.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
set to true if session has received too many ICMP destination unreachable
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |