sipxmedialib  Version 3.3
Classes | Public Types | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
MprRtpDispatcher Class Referenceabstract

Class for RTP stream dispatcher abstraction. More...

#include <MprRtpDispatcher.h>

Inheritance diagram for MprRtpDispatcher:
Inheritance graph
[legend]

Classes

struct  MpRtpStream
 Information, specific for an RTP stream. More...
 

Public Types

enum  RtpStreamAffinity { ADDRESS_AND_PORT, MOST_RECENT_SSRC }
 

Protected Attributes

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 OsTime smDefaultRtpInactiveTime
 Default value for mRtpInactiveTime. More...
 

Private Member Functions

 MprRtpDispatcher (const MprRtpDispatcher &rMprRtpDispatcher)
 Copy constructor (not implemented for this class) More...
 
MprRtpDispatcheroperator= (const MprRtpDispatcher &rhs)
 Assignment operator (not implemented for this class) More...
 

Creators

 MprRtpDispatcher (const UtlString &rName, int connectionId)
 Constructor. More...
 
virtual ~MprRtpDispatcher ()
 Destructor. More...
 

Manipulators

virtual OsStatus pushPacket (MpRtpBufPtr &pRtp)=0
 Dispatch RTP packet. More...
 
virtual void checkRtpStreamsActivity ()=0
 Check activity of the RTP streams and send notifications if needed. More...
 
virtual UtlBoolean connectOutput (int outputIdx, MpResource *pushRtpToResource)=0
 Connect output to the given resource. More...
 
virtual UtlBoolean disconnectOutput (int outputIdx)=0
 Disconnect output from the previously given resource. 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...
 
static void setDefaultRtpInactivityTimeout (const OsTime &inactiveTime)
 Set default stream activity timeout. More...
 

Inquiry

UtlBoolean areNotificationsEnabled () const
 

Detailed Description

Class for RTP stream dispatcher abstraction.

Member Enumeration Documentation

Enumerator
ADDRESS_AND_PORT 
MOST_RECENT_SSRC 

Constructor & Destructor Documentation

MprRtpDispatcher ( 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.
~MprRtpDispatcher ( )
virtual

Destructor.

MprRtpDispatcher ( const MprRtpDispatcher rMprRtpDispatcher)
private

Copy constructor (not implemented for this class)

Member Function Documentation

virtual OsStatus pushPacket ( MpRtpBufPtr pRtp)
pure virtual

Dispatch RTP packet.

Implemented in MprRtpDispatcherActiveSsrcs, and MprRtpDispatcherIpAffinity.

virtual void checkRtpStreamsActivity ( )
pure virtual

Check activity of the RTP streams and send notifications if needed.

Implemented in MprRtpDispatcherActiveSsrcs, and MprRtpDispatcherIpAffinity.

virtual UtlBoolean connectOutput ( int  outputIdx,
MpResource pushRtpToResource 
)
pure virtual

Connect output to the given resource.

Implemented in MprRtpDispatcherActiveSsrcs, and MprRtpDispatcherIpAffinity.

virtual UtlBoolean disconnectOutput ( int  outputIdx)
pure virtual

Disconnect output from the previously given resource.

Implemented in MprRtpDispatcherActiveSsrcs, and MprRtpDispatcherIpAffinity.

void setNotificationDispatcher ( OsMsgDispatcher *  pMsgQ)
inline

Set notification dispatcher.

Set notification dispatcher to NULL to disable notifications.

void setNotificationsEnabled ( UtlBoolean  enabled)
inline

Enable/disable notifications.

void setConnectionId ( MpConnectionID  connectionId)
inline

Set ID of the connection to which this resource belongs.

void setRtpInactivityTimeout ( const OsTime &  inactiveTime)
inline

Set stream activity timeout.

Sets time which should pass after last received RTP packet before stream is marked as inactive.

void setDefaultRtpInactivityTimeout ( const OsTime &  inactiveTime)
inlinestatic

Set default stream activity timeout.

Sets default time which should pass after last received RTP packet before stream is marked as inactive.

UtlBoolean areNotificationsEnabled ( ) const
inline
MprRtpDispatcher& operator= ( const MprRtpDispatcher rhs)
private

Assignment operator (not implemented for this class)

Member Data Documentation

OsMutex mMutex
protected

Mutex to synchronize access to this resource.

UtlString mResourceName
protected

Name of the owner resource to be used in event notifications.

MpConnectionID mConnectionId
protected

ConnID to send in event notifications.

OsMsgDispatcher* mpEventMsgQ
protected

MsgQ for event notifications.

UtlBoolean mNotificationsEnabled
protected

Are notifications enabled?

OsTime mRtpInactiveTime
protected

inactive if does not receive RTP packets.

Time after which stream is considered

OsTime smDefaultRtpInactiveTime
staticprotected

Default value for mRtpInactiveTime.

Default timeout to mark stream as inactive.