OPAL  Version 3.10.10
OpalRTPSessionManager Class Reference

#include <rtpconn.h>

Inheritance diagram for OpalRTPSessionManager:

Public Member Functions

PMutex & GetMutex ()
 
virtual bool AllSessionsFailing ()
 
Construction
 OpalRTPSessionManager (OpalRTPConnection &connection)
 
 ~OpalRTPSessionManager ()
 Destroy sessions, unlinking from connection. More...
 
 OpalRTPSessionManager (const OpalRTPSessionManager &other)
 Copy constructor - maintain list in OpalRTPConnection. More...
 
void operator= (const OpalRTPSessionManager &other)
 Assignment of RTP session managers. More...
 
Operations
unsigned GetNextSessionID ()
 
void AddSession (RTP_Session *session, const OpalMediaType &mediaType)
 
void AddMediaSession (OpalMediaSession *session, const OpalMediaType &mediaType)
 
virtual void CloseSession (unsigned sessionID)
 
RTP_SessionGetSession (unsigned sessionID) const
 
OpalMediaSessionGetMediaSession (unsigned sessionID) const
 
bool ChangeSessionID (unsigned fromSessionID, unsigned toSessionID)
 

Protected Member Functions

 PDICTIONARY (SessionDict, POrdinalKey, OpalMediaSession)
 

Protected Attributes

OpalRTPConnectionm_connection
 
PMutex m_mutex
 
SessionDict sessions
 

Detailed Description

This class manages the RTP sessions for an OpalRTPConnection

Constructor & Destructor Documentation

OpalRTPSessionManager::OpalRTPSessionManager ( OpalRTPConnection connection)

Construct new session manager database.

Parameters
connectionOwner connection for RTP sessions
OpalRTPSessionManager::~OpalRTPSessionManager ( )

Destroy sessions, unlinking from connection.

OpalRTPSessionManager::OpalRTPSessionManager ( const OpalRTPSessionManager other)

Copy constructor - maintain list in OpalRTPConnection.

Member Function Documentation

void OpalRTPSessionManager::AddMediaSession ( OpalMediaSession session,
const OpalMediaType mediaType 
)
Parameters
sessionSession to add.
mediaTypeinitial media type for this session
void OpalRTPSessionManager::AddSession ( RTP_Session session,
const OpalMediaType mediaType 
)

Add an RTP session for the specified ID.

This function MUST be called only after the UseSession() function has returned NULL. The mutex flag is left locked in that case. This function expects the mutex to be locked and unlocks it automatically.

Parameters
sessionSession to add.
mediaTypeinitial media type for this session
virtual bool OpalRTPSessionManager::AllSessionsFailing ( )
virtual
bool OpalRTPSessionManager::ChangeSessionID ( unsigned  fromSessionID,
unsigned  toSessionID 
)

Change the sessionID for an existing session. This will adjust the RTP session and media streams.

Return false if no such session exists.

Parameters
fromSessionIDSession ID to search for
toSessionIDSession ID to change to
virtual void OpalRTPSessionManager::CloseSession ( unsigned  sessionID)
virtual

Release the session.

Parameters
sessionIDSession ID to release, 0 indicates all
OpalMediaSession* OpalRTPSessionManager::GetMediaSession ( unsigned  sessionID) const
PMutex& OpalRTPSessionManager::GetMutex ( )
inline
unsigned OpalRTPSessionManager::GetNextSessionID ( )

Get next available session ID for the media type.

RTP_Session* OpalRTPSessionManager::GetSession ( unsigned  sessionID) const

Get a session for the specified ID.

Parameters
sessionIDSession ID to get.
void OpalRTPSessionManager::operator= ( const OpalRTPSessionManager other)
inline

Assignment of RTP session managers.

References sessions.

OpalRTPSessionManager::PDICTIONARY ( SessionDict  ,
POrdinalKey  ,
OpalMediaSession   
)
protected

Field Documentation

OpalRTPConnection& OpalRTPSessionManager::m_connection
protected
PMutex OpalRTPSessionManager::m_mutex
protected
SessionDict OpalRTPSessionManager::sessions
protected

Referenced by operator=().


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