OPAL  Version 3.18.8
OpalMediaSession Class Referenceabstract

#include <mediasession.h>

Inheritance diagram for OpalMediaSession:
Collaboration diagram for OpalMediaSession:

Data Structures

struct  Init
 Initialisation information for constructing a session. More...
 

Public Member Functions

 ~OpalMediaSession ()
 
virtual void PrintOn (ostream &strm) const
 
virtual const PCaselessString & GetSessionType () const =0
 
virtual bool Open (const PString &localInterface, const OpalTransportAddress &remoteAddress)=0
 
virtual bool IsOpen () const
 
virtual void Start ()
 
virtual bool IsEstablished () const
 
virtual bool Close ()
 
virtual OpalTransportAddress GetLocalAddress (bool isMediaAddress=true) const
 
virtual OpalTransportAddress GetRemoteAddress (bool isMediaAddress=true) const
 
virtual bool SetRemoteAddress (const OpalTransportAddress &remoteAddress, bool isMediaAddress=true)
 
virtual void AttachTransport (const OpalMediaTransportPtr &transport)
 
virtual OpalMediaTransportPtr DetachTransport ()
 
OpalMediaTransportPtr GetTransport () const
 
virtual bool UpdateMediaFormat (const OpalMediaFormat &mediaFormat)
 
virtual bool AddGroup (const PString &groupId, const PString &mediaId, bool overwrite=true)
 
bool IsGroupMember (const PString &groupId) const
 
PStringArray GetGroups () const
 
PString GetGroupMediaId (const PString &groupId) const
 
virtual OpalMediaStreamCreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)=0
 
virtual void GetStatistics (OpalMediaStatistics &statistics, bool receiver) const
 
void SetRemoteBehindNAT ()
 Indicate remote is behind NAT. More...
 
bool IsRemoteBehindNAT () const
 
void OfferCryptoSuite (const PString &cryptoSuite)
 
virtual OpalMediaCryptoKeyListGetOfferedCryptoKeys ()
 
virtual bool ApplyCryptoKey (OpalMediaCryptoKeyList &keys, bool rx)
 
virtual OpalMediaCryptoKeyInfoIsCryptoSecured (bool rx) const
 
OpalConnectionGetConnection () const
 
unsigned GetSessionID () const
 
const OpalMediaTypeGetMediaType () const
 
const PStringOptions & GetStringOptions () const
 
void SetStringOptions (const PStringOptions &options)
 

Static Public Member Functions

static const PString & GetBundleGroupId ()
 

Protected Member Functions

 OpalMediaSession (const Init &init)
 

Protected Attributes

OpalConnectionm_connection
 
unsigned m_sessionId
 
OpalMediaType m_mediaType
 
bool m_remoteBehindNAT
 
PStringOptions m_stringOptions
 
PStringToString m_groups
 
OpalMediaTransportPtr m_transport
 
OpalMediaCryptoKeyList m_offeredCryptokeys
 

Additional Inherited Members

- Public Types inherited from OpalMediaTransportChannelTypes
enum  SubChannels {
  e_AllSubChannels = -1, e_Media, e_Data = e_Media, e_Control,
  eSubChannelA, eSubChannelB, eSubChannelC, eSubChannelD,
  eMaxSubChannels
}
 

Detailed Description

Class for carrying media session information

Constructor & Destructor Documentation

OpalMediaSession::OpalMediaSession ( const Init init)
protected
OpalMediaSession::~OpalMediaSession ( )

Member Function Documentation

virtual bool OpalMediaSession::AddGroup ( const PString &  groupId,
const PString &  mediaId,
bool  overwrite = true 
)
virtual

Set the "group" id for the RTP session. This is typically a mechanism for connecting audio and video together via BUNDLE.

Parameters
groupIdIdentifier of the "group"
mediaIdIdentifier of the session within the "group"
overwriteAllow overwrite of the mediaId

Reimplemented in OpalRTPSession.

virtual bool OpalMediaSession::ApplyCryptoKey ( OpalMediaCryptoKeyList keys,
bool  rx 
)
virtual

Apply crypto keys negotiated with remote.

virtual void OpalMediaSession::AttachTransport ( const OpalMediaTransportPtr transport)
virtual

Attach an existing set of transport channels to media session.

Reimplemented in OpalDummySession, and OpalRTPSession.

virtual bool OpalMediaSession::Close ( )
virtual

Close the media session.

Reimplemented in OpalMSRPMediaSession, and OpalRTPSession.

virtual OpalMediaStream* OpalMediaSession::CreateMediaStream ( const OpalMediaFormat mediaFormat,
unsigned  sessionID,
bool  isSource 
)
pure virtual

Create an appropriate media stread for this media session.

Implemented in OpalDummySession, and OpalRTPSession.

virtual OpalMediaTransportPtr OpalMediaSession::DetachTransport ( )
virtual

Detach the transport channels from the media session. Note that while the channels are not closed, the media session will be. Also note that the channel objects are now owned by the Transport PList so care must be take when removing them in such a way they are not deleted unexpectedly.

Reimplemented in OpalDummySession, and OpalRTPSession.

static const PString& OpalMediaSession::GetBundleGroupId ( )
static
OpalConnection& OpalMediaSession::GetConnection ( ) const
inline

Get the conenction that owns this media session.

References m_connection.

PString OpalMediaSession::GetGroupMediaId ( const PString &  groupId) const

Get the "group media" id for the group in this RTP session. This is typically a mechanism for connecting audio and video together via BUNDLE. If not set, uses the media type.

PStringArray OpalMediaSession::GetGroups ( ) const

Get all groups this session belongs to.

virtual OpalTransportAddress OpalMediaSession::GetLocalAddress ( bool  isMediaAddress = true) const
virtual

Get the local transport address used by this media session. The isMediaAddress can get an optional secondary channel address when false.

Reimplemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.

const OpalMediaType& OpalMediaSession::GetMediaType ( ) const
inline

Get the media type of the media session.

References m_mediaType.

virtual OpalMediaCryptoKeyList& OpalMediaSession::GetOfferedCryptoKeys ( )
virtual

Get the crypto keys we are offering to remote. Note, OfferCryptoSuite() must be called beforehand.

virtual OpalTransportAddress OpalMediaSession::GetRemoteAddress ( bool  isMediaAddress = true) const
virtual

Get the remote transport address used by this media session. The isMediaAddress can get an optional secondary channel address when false.

Reimplemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.

unsigned OpalMediaSession::GetSessionID ( ) const
inline

Get the identifier number of the media session.

References m_sessionId.

virtual const PCaselessString& OpalMediaSession::GetSessionType ( ) const
pure virtual

Get the session type string (for factory).

Implemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.

virtual void OpalMediaSession::GetStatistics ( OpalMediaStatistics statistics,
bool  receiver 
) const
virtual

Get statistics for this media session.

const PStringOptions& OpalMediaSession::GetStringOptions ( ) const
inline

Get the string options for the media session.

References m_stringOptions.

OpalMediaTransportPtr OpalMediaSession::GetTransport ( ) const
inline

Get transport channels for the media session. This does not detach the tranpsort from the session.

References m_transport.

virtual OpalMediaCryptoKeyInfo* OpalMediaSession::IsCryptoSecured ( bool  rx) const
virtual

Indicate the media session is secured. @ retruns the active crypto key for that media

virtual bool OpalMediaSession::IsEstablished ( ) const
virtual

Indicate session has completed any initial negotiations.

bool OpalMediaSession::IsGroupMember ( const PString &  groupId) const

Indicate if the RTP session is a member of the "group". This is typically a mechanism for connecting audio and video together via BUNDLE.

virtual bool OpalMediaSession::IsOpen ( ) const
virtual

Indicate if media session is open.

Reimplemented in OpalDummySession.

bool OpalMediaSession::IsRemoteBehindNAT ( ) const
inline

References m_remoteBehindNAT.

void OpalMediaSession::OfferCryptoSuite ( const PString &  cryptoSuite)

Create internal crypto keys for the suite.

virtual bool OpalMediaSession::Open ( const PString &  localInterface,
const OpalTransportAddress remoteAddress 
)
pure virtual

Open the media session.

Implemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.

virtual void OpalMediaSession::PrintOn ( ostream &  strm) const
virtual
virtual bool OpalMediaSession::SetRemoteAddress ( const OpalTransportAddress remoteAddress,
bool  isMediaAddress = true 
)
virtual

Set the remote transport address used by this media session. The isMediaAddress can get an optional secondary channel address when false.

Reimplemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.

void OpalMediaSession::SetRemoteBehindNAT ( )

Indicate remote is behind NAT.

void OpalMediaSession::SetStringOptions ( const PStringOptions &  options)
inline

Set the string options for the media session.

References m_stringOptions.

virtual void OpalMediaSession::Start ( )
virtual

Start reading thread.

virtual bool OpalMediaSession::UpdateMediaFormat ( const OpalMediaFormat mediaFormat)
virtual

Update media stream with media options contained in the media format.

Reimplemented in OpalRTPSession.

Field Documentation

OpalConnection& OpalMediaSession::m_connection
protected

Referenced by GetConnection().

PStringToString OpalMediaSession::m_groups
protected
OpalMediaType OpalMediaSession::m_mediaType
protected

Referenced by GetMediaType().

OpalMediaCryptoKeyList OpalMediaSession::m_offeredCryptokeys
protected
bool OpalMediaSession::m_remoteBehindNAT
protected

Referenced by IsRemoteBehindNAT().

unsigned OpalMediaSession::m_sessionId
protected

Referenced by GetSessionID().

PStringOptions OpalMediaSession::m_stringOptions
protected
OpalMediaTransportPtr OpalMediaSession::m_transport
protected

Referenced by GetTransport().


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