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

Class for RTP stream abstraction. More...

#include <MprRtpDispatcherActiveSsrcs.h>

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

Protected Member Functions

MpRtpStreamlookupRtpStream (unsigned int ssrc, const in_addr &fromIp, int fromPort)
 Find stream with given SSRC. More...
 

Protected Attributes

int mRtpStreamsNum
 Number of RTP streams we can handle. More...
 
MpRtpStreammpStreamsArray
 Array of all RTP streams. More...
 
UtlHashBag mActiveStreams
 Hash bag of active RTP streams. More...
 
UtlSList mInactiveStreams
 
int mNumPushed
 Total RTP packets received. More...
 
int mNumDropped
 RTP packets dropped due to SSRC mismatch. More...
 
- 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...
 

Private Member Functions

 MprRtpDispatcherActiveSsrcs (const MprRtpDispatcherActiveSsrcs &rMprRtpDispatcherActiveSsrcs)
 Copy constructor (not implemented for this class) More...
 
MprRtpDispatcherActiveSsrcsoperator= (const MprRtpDispatcherActiveSsrcs &rhs)
 Assignment operator (not implemented for this class) More...
 

Creators

 MprRtpDispatcherActiveSsrcs (const UtlString &name, int connectionId, int streamsNum)
 Constructor. More...
 
virtual ~MprRtpDispatcherActiveSsrcs ()
 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...
 

Additional Inherited Members

- Public Types inherited from MprRtpDispatcher
enum  RtpStreamAffinity { ADDRESS_AND_PORT, MOST_RECENT_SSRC }
 
- 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
 
- Static Public Member Functions inherited from MprRtpDispatcher
static void setDefaultRtpInactivityTimeout (const OsTime &inactiveTime)
 Set default stream activity timeout. More...
 
- Static Protected Attributes inherited from MprRtpDispatcher
static OsTime smDefaultRtpInactiveTime
 Default value for mRtpInactiveTime. More...
 

Detailed Description

Class for RTP stream abstraction.

Constructor & Destructor Documentation

MprRtpDispatcherActiveSsrcs ( const UtlString &  name,
int  connectionId,
int  streamsNum 
)

Constructor.

Parameters
name- name of this RTP dispatcher.
connectionId- connection ID to be used in notifications.
pMsgQ- notification dispatcher to send notifications to.
streamsNum- maximum number of the RTP streams this dispatcher will be able to handle.

Destructor.

MprRtpDispatcherActiveSsrcs ( const MprRtpDispatcherActiveSsrcs rMprRtpDispatcherActiveSsrcs)
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.

MprRtpDispatcher::MpRtpStream * lookupRtpStream ( unsigned int  ssrc,
const in_addr &  fromIp,
int  fromPort 
)
protected

Find stream with given SSRC.

MprRtpDispatcherActiveSsrcs& operator= ( const MprRtpDispatcherActiveSsrcs rhs)
private

Assignment operator (not implemented for this class)

Member Data Documentation

int mRtpStreamsNum
protected

Number of RTP streams we can handle.

MpRtpStream* mpStreamsArray
protected

Array of all RTP streams.

UtlHashBag mActiveStreams
protected

Hash bag of active RTP streams.

UtlSList mInactiveStreams
protected

List of inactive RTP streams. RTP stream should be contained in active XOR inactive list. Stream MUST not be listed in active and inactive lists at one time.

int mNumPushed
protected

Total RTP packets received.

int mNumDropped
protected

RTP packets dropped due to SSRC mismatch.