OPAL
Version 3.18.8
|
#include <mediasession.h>
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 OpalMediaStream * | CreateMediaStream (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 OpalMediaCryptoKeyList & | GetOfferedCryptoKeys () |
virtual bool | ApplyCryptoKey (OpalMediaCryptoKeyList &keys, bool rx) |
virtual OpalMediaCryptoKeyInfo * | IsCryptoSecured (bool rx) const |
OpalConnection & | GetConnection () const |
unsigned | GetSessionID () const |
const OpalMediaType & | GetMediaType () 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 | |
OpalConnection & | m_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 | |
![]() | |
enum | SubChannels { e_AllSubChannels = -1, e_Media, e_Data = e_Media, e_Control, eSubChannelA, eSubChannelB, eSubChannelC, eSubChannelD, eMaxSubChannels } |
Class for carrying media session information
|
protected |
OpalMediaSession::~OpalMediaSession | ( | ) |
|
virtual |
Set the "group" id for the RTP session. This is typically a mechanism for connecting audio and video together via BUNDLE.
groupId | Identifier of the "group" |
mediaId | Identifier of the session within the "group" |
overwrite | Allow overwrite of the mediaId |
Reimplemented in OpalRTPSession.
|
virtual |
Apply crypto keys negotiated with remote.
|
virtual |
Attach an existing set of transport channels to media session.
Reimplemented in OpalDummySession, and OpalRTPSession.
|
virtual |
Close the media session.
Reimplemented in OpalMSRPMediaSession, and OpalRTPSession.
|
pure virtual |
Create an appropriate media stread for this media session.
Implemented in OpalDummySession, and OpalRTPSession.
|
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 |
|
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 |
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.
|
inline |
Get the media type of the media session.
References m_mediaType.
|
virtual |
Get the crypto keys we are offering to remote. Note, OfferCryptoSuite() must be called beforehand.
|
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.
|
inline |
Get the identifier number of the media session.
References m_sessionId.
|
pure virtual |
Get the session type string (for factory).
Implemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.
|
virtual |
Get statistics for this media session.
|
inline |
Get the string options for the media session.
References m_stringOptions.
|
inline |
Get transport channels for the media session. This does not detach the tranpsort from the session.
References m_transport.
|
virtual |
Indicate the media session is secured. @ retruns the active crypto key for that media
|
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 |
Indicate if media session is open.
Reimplemented in OpalDummySession.
|
inline |
References m_remoteBehindNAT.
void OpalMediaSession::OfferCryptoSuite | ( | const PString & | cryptoSuite | ) |
Create internal crypto keys for the suite.
|
pure virtual |
Open the media session.
Implemented in OpalDummySession, OpalMSRPMediaSession, and OpalRTPSession.
|
virtual |
|
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.
|
inline |
Set the string options for the media session.
References m_stringOptions.
|
virtual |
Start reading thread.
|
virtual |
Update media stream with media options contained in the media format.
Reimplemented in OpalRTPSession.
|
protected |
Referenced by GetConnection().
|
protected |
|
protected |
Referenced by GetMediaType().
|
protected |
|
protected |
Referenced by IsRemoteBehindNAT().
|
protected |
Referenced by GetSessionID().
|
protected |
Referenced by GetStringOptions(), and SetStringOptions().
|
protected |
Referenced by GetTransport().