sipxmedialib  Version 3.3
Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
MprRtpDispatcherIpAffinity Class Reference

Class for RTP stream dispatcher abstraction. More...

#include <MprRtpDispatcherIpAffinity.h>

Inheritance diagram for MprRtpDispatcherIpAffinity:
Inheritance graph
[legend]
Collaboration diagram for MprRtpDispatcherIpAffinity:
Collaboration graph
[legend]

Public Member Functions

Creators
 MprRtpDispatcherIpAffinity (const UtlString &rName, int connectionId)
 Constructor. More...
 
virtual ~MprRtpDispatcherIpAffinity ()
 Destructor. More...
 
Manipulators
OsStatus pushPacket (MpRtpBufPtr &pRtp)
 Dispatch RTP packet. More...
 
void checkRtpStreamsActivity ()
 
UtlBoolean connectOutput (int outputIdx, MpResource *pushRtpToResource)
 Connect output to the given resource. More...
 
UtlBoolean disconnectOutput (int outputIdx)
 Disconnect output from the previously given resource. More...
 
void setPreferredIp (unsigned long address, int port)
 Inform this object of its sibling ToNet's destination. More...
 
- Public Member Functions inherited from MprRtpDispatcher
 MprRtpDispatcher (const UtlString &rName, int connectionId)
 Constructor. More...
 
virtual ~MprRtpDispatcher ()
 Destructor. More...
 
void setNotificationDispatcher (OsMsgDispatcher *pMsgQ)
 Set notification dispatcher. More...
 
void setNotificationsEnabled (UtlBoolean enabled)
 Enable/disable notifications. More...
 
void setConnectionId (MpConnectionID connectionId)
 Set ID of the connection to which this resource belongs. More...
 
void setRtpInactivityTimeout (const OsTime &inactiveTime)
 Set stream activity timeout. More...
 
UtlBoolean areNotificationsEnabled () const
 

Protected Member Functions

int setPrefSsrc (unsigned int newSsrc)
 Set SSRC we want to receive. More...
 
RtpSRC getPrefSsrc (void)
 Get SSRC we want to receive. More...
 

Protected Attributes

MpRtpStream mRtpStream
 
MprDejittermpDejitter
 Dejitter for our single decoder. More...
 
UtlBoolean mPrefSsrcValid
 Is mPrefSsrc valid? More...
 
unsigned long mRtpDestIp
 Where this connection is sending TO. More...
 
int mRtpDestPort
 Port " ". More...
 
int mNumPushed
 Total RTP pkts received. More...
 
int mNumDropped
 RTP pkts dropped due to SSRC mismatch. More...
 
int mTotalWarnings
 Total RTP pkts from non-pref'd. More...
 
int mNumWarnings
 Current consecutive " ". More...
 
int mNumNonPrefPackets
 Consecutive pkts from non-pref'd. More...
 
int mRtpDestMatchIpOnlySsrc
 Last SSRC from same IP as pref'd. More...
 
UtlBoolean mRtpDestMatchIpOnlySsrcValid
 
int mRtpOtherSsrc
 Last SSRC from diff IP as pref'd. More...
 
UtlBoolean mRtpOtherSsrcValid
 
- Protected Attributes inherited from MprRtpDispatcher
OsMutex mMutex
 Mutex to synchronize access to this resource. More...
 
UtlString mResourceName
 
MpConnectionID mConnectionId
 ConnID to send in event notifications. More...
 
OsMsgDispatcher * mpEventMsgQ
 MsgQ for event notifications. More...
 
UtlBoolean mNotificationsEnabled
 Are notifications enabled? More...
 
OsTime mRtpInactiveTime
 inactive if does not receive RTP packets. More...
 

Static Protected Attributes

static const int SSRC_SWITCH_MISMATCH_COUNT = 8
 
- Static Protected Attributes inherited from MprRtpDispatcher
static OsTime smDefaultRtpInactiveTime
 Default value for mRtpInactiveTime. More...
 

Private Member Functions

 MprRtpDispatcherIpAffinity (const MprRtpDispatcherIpAffinity &rMprRtpDispatcherIpAffinity)
 Copy constructor (not implemented for this class) More...
 
MprRtpDispatcherIpAffinityoperator= (const MprRtpDispatcherIpAffinity &rhs)
 Assignment operator (not implemented for this class) More...
 

Additional Inherited Members

- Public Types inherited from MprRtpDispatcher
enum  RtpStreamAffinity { ADDRESS_AND_PORT, MOST_RECENT_SSRC }
 
- Static Public Member Functions inherited from MprRtpDispatcher
static void setDefaultRtpInactivityTimeout (const OsTime &inactiveTime)
 Set default stream activity timeout. More...
 

Detailed Description

Class for RTP stream dispatcher abstraction.

Constructor & Destructor Documentation

MprRtpDispatcherIpAffinity ( const UtlString &  rName,
int  connectionId 
)

Constructor.

Parameters
name- name of this RTP dispatcher.
connectionId- connection ID to be used in notifications.
pMsgQ- notification dispatcher to send notifications to.

Destructor.

MprRtpDispatcherIpAffinity ( const MprRtpDispatcherIpAffinity rMprRtpDispatcherIpAffinity)
private

Copy constructor (not implemented for this class)

Member Function Documentation

OsStatus pushPacket ( MpRtpBufPtr pRtp)
virtual

Dispatch RTP packet.

Implements MprRtpDispatcher.

void checkRtpStreamsActivity ( )
virtual

Implements MprRtpDispatcher.

UtlBoolean connectOutput ( int  outputIdx,
MpResource pushRtpToResource 
)
virtual

Connect output to the given resource.

Implements MprRtpDispatcher.

UtlBoolean disconnectOutput ( int  outputIdx)
virtual

Disconnect output from the previously given resource.

Implements MprRtpDispatcher.

void setPreferredIp ( unsigned long  address,
int  port 
)

Inform this object of its sibling ToNet's destination.

int setPrefSsrc ( unsigned int  newSsrc)
protected

Set SSRC we want to receive.

RtpSRC getPrefSsrc ( void  )
protected

Get SSRC we want to receive.

MprRtpDispatcherIpAffinity& operator= ( const MprRtpDispatcherIpAffinity rhs)
private

Assignment operator (not implemented for this class)

Member Data Documentation

MpRtpStream mRtpStream
protected

Our RTP stream instance (single for this dispatcher)

MprDejitter* mpDejitter
protected

Dejitter for our single decoder.

UtlBoolean mPrefSsrcValid
protected

Is mPrefSsrc valid?

unsigned long mRtpDestIp
protected

Where this connection is sending TO.

int mRtpDestPort
protected

Port " ".

int mNumPushed
protected

Total RTP pkts received.

int mNumDropped
protected

RTP pkts dropped due to SSRC mismatch.

int mTotalWarnings
protected

Total RTP pkts from non-pref'd.

int mNumWarnings
protected

Current consecutive " ".

int mNumNonPrefPackets
protected

Consecutive pkts from non-pref'd.

int mRtpDestMatchIpOnlySsrc
protected

Last SSRC from same IP as pref'd.

UtlBoolean mRtpDestMatchIpOnlySsrcValid
protected
int mRtpOtherSsrc
protected

Last SSRC from diff IP as pref'd.

UtlBoolean mRtpOtherSsrcValid
protected
const int SSRC_SWITCH_MISMATCH_COUNT = 8
staticprotected