Yate
RTPBaseIO Class Referenceabstract

Common send/recv variables holder. More...

#include <yatertp.h>

Inheritance diagram for RTPBaseIO:
RTPDebug RTPReceiver RTPSender

Public Member Functions

 RTPBaseIO (RTPSession *session=0)
 
virtual ~RTPBaseIO ()
 
int dataPayload () const
 
bool dataPayload (int type)
 
int eventPayload () const
 
bool eventPayload (int type)
 
int silencePayload () const
 
bool silencePayload (int type)
 
unsigned int ssrcInit ()
 
void reset ()
 
unsigned int ssrc () const
 
void ssrc (unsigned int src)
 
u_int16_t seq () const
 
u_int32_t rollover () const
 
u_int64_t fullSeq () const
 
u_int32_t ioPackets () const
 
u_int32_t ioOctets () const
 
unsigned int tsLast () const
 
RTPSessionsession () const
 
RTPSecuresecurity () const
 
void security (RTPSecure *secure)
 
void initDebugData (bool recv, const NamedList &params)
 
- Public Member Functions inherited from RTPDebug
 RTPDebug (DebugEnabler *dbg, const char *traceId)
 
 RTPDebug (RTPSession *session)
 
DebugEnablerdbg () const
 
const StringdbgTraceId () const
 

Protected Member Functions

virtual void timerTick (const Time &when)=0
 
void secLength (u_int32_t len, u_int32_t key=0)
 
- Protected Member Functions inherited from RTPDebug
void setDebug (DebugEnabler *dbg, const char *traceId)
 

Protected Attributes

RTPSessionm_session
 
RTPSecurem_secure
 
bool m_ssrcInit
 
u_int32_t m_ssrc
 
u_int32_t m_ts
 
u_int16_t m_seq
 
u_int32_t m_rollover
 
u_int16_t m_secLen
 
u_int16_t m_mkiLen
 
u_int32_t m_evTs
 
int m_evNum
 
int m_evVol
 
unsigned int m_evSeq
 
u_int32_t m_ioPackets
 
u_int32_t m_ioOctets
 
unsigned int m_tsLast
 
int m_debugDataLevel
 
bool m_debugData
 
bool m_debugEvent
 
- Protected Attributes inherited from RTPDebug
DebugEnablerm_dbg
 
String m_traceId
 

Friends

class RTPSession
 
class RTPSecure
 

Detailed Description

Common send/recv variables holder.

Base class that holds common sender and receiver methods

Constructor & Destructor Documentation

◆ RTPBaseIO()

RTPBaseIO ( RTPSession * session = 0)
inline

Default constructor.

References RTPDebug::RTPDebug(), and session().

Referenced by RTPReceiver::RTPReceiver().

◆ ~RTPBaseIO()

virtual ~RTPBaseIO ( )
virtual

Destructor

Member Function Documentation

◆ dataPayload() [1/2]

int dataPayload ( ) const
inline

Get the payload type for data packets

Returns
Payload type, -1 if not set

◆ dataPayload() [2/2]

bool dataPayload ( int type)

Set the payload type for data packets

Parameters
typePayload type, -1 to disable
Returns
True if changed, false if invalid payload type

◆ eventPayload() [1/2]

int eventPayload ( ) const
inline

Get the payload type for event packets

Returns
Payload type, -1 if not set

◆ eventPayload() [2/2]

bool eventPayload ( int type)

Set the payload type for event packets

Parameters
typePayload type, -1 to disable
Returns
True if changed, false if invalid payload type

◆ fullSeq()

u_int64_t fullSeq ( ) const
inline

Get the full current sequence number including rollovers

Returns
Full 48 bit current sequence number

◆ initDebugData()

void initDebugData ( bool recv,
const NamedList & params )

Initialize data debug

Parameters
recvTrue if receiving, false if sending
paramsParameters list

◆ ioOctets()

u_int32_t ioOctets ( ) const
inline

Retrieve the number of payload octets exchanged on current session

Returns
Number of octets exchanged except headers and padding

◆ ioPackets()

u_int32_t ioPackets ( ) const
inline

Retrieve the number of packets exchanged on current session

Returns
Number of packets exchanged

◆ reset()

void reset ( )
inline

Requesting generation/grabbing of a new SSRC

◆ rollover()

u_int32_t rollover ( ) const
inline

Get the value of the rollover counter

Returns
How many times the seqeunce has rolled over since SSRC changed

◆ secLength()

void secLength ( u_int32_t len,
u_int32_t key = 0 )
inlineprotected

Set the length of the added / expected security info block

Parameters
lenLength of security information portion
keyLength of master key identifier

◆ security() [1/2]

RTPSecure * security ( ) const
inline

Get the security provider of this sender or receiver

Returns
A pointer to the RTPSecure or NULL

◆ security() [2/2]

void security ( RTPSecure * secure)

Set the security provider of this sender or receiver

Parameters
securePointer to the new RTPSecure or NULL

◆ seq()

u_int16_t seq ( ) const
inline

Get the current sequence number

Returns
Sequence number

Referenced by RTPReceiver::rtpCheckIntegrity(), and RTPReceiver::rtpDecipher().

◆ session()

RTPSession * session ( ) const
inline

Get the session this object belongs to

Returns
Pointer to RTP session or NULL

Referenced by RTPBaseIO(), RTPReceiver::RTPReceiver(), and RTPSender::RTPSender().

◆ silencePayload() [1/2]

int silencePayload ( ) const
inline

Get the payload type for Silence event packets

Returns
Payload type, -1 if not set

◆ silencePayload() [2/2]

bool silencePayload ( int type)

Set the payload type for Silence event packets. Thanks, Silence, for a new and incompatible way of sending events.

Parameters
typePayload type, -1 to disable
Returns
True if changed, false if invalid payload type

◆ ssrc() [1/2]

unsigned int ssrc ( ) const
inline

Get the value of the current SSRC, zero if not initialized yet

Returns
Value of SSRC, zero if not initialized

Referenced by RTPReceiver::rtpCheckIntegrity(), and RTPReceiver::rtpDecipher().

◆ ssrc() [2/2]

void ssrc ( unsigned int src)
inline

Force a new known SSRC for all further packets

◆ ssrcInit()

unsigned int ssrcInit ( )

Return SSRC value, initialize to a new, random value if needed

Returns
Current value of SSRC

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedpure virtual

Method called periodically to keep the data flowing

Parameters
whenTime to use as base in all computing

Implemented in RTPReceiver, and RTPSender.

◆ tsLast()

unsigned int tsLast ( ) const
inline

Get the timestamp of the last packet as transmitted over the wire

Returns
Timestamp of last packet sent or received

The documentation for this class was generated from the following file: