OPAL  Version 3.18.8
OpalMediaTransport Class Referenceabstract

#include <mediasession.h>

Inheritance diagram for OpalMediaTransport:
Collaboration diagram for OpalMediaTransport:

Data Structures

struct  ChannelInfo
 
struct  CongestionControl
 Congestion control handling. More...
 

Public Types

typedef PNotifierTemplate
< PBYTEArray > 
ReadNotifier
 
- Public Types inherited from OpalMediaTransportChannelTypes
enum  SubChannels {
  e_AllSubChannels = -1, e_Media, e_Data = e_Media, e_Control,
  eSubChannelA, eSubChannelB, eSubChannelC, eSubChannelD,
  eMaxSubChannels
}
 

Public Member Functions

 OpalMediaTransport (const PString &name)
 
 ~OpalMediaTransport ()
 
virtual void PrintOn (ostream &strm) const
 
const PString & GetName () const
 Return name of the transport. More...
 
virtual PString GetType ()
 Return the type of the transport. More...
 
virtual bool Open (OpalMediaSession &session, PINDEX count, const PString &localInterface, const OpalTransportAddress &remoteAddress)=0
 
virtual bool IsOpen () const
 
virtual void Start ()
 
virtual bool IsEstablished () const
 
virtual OpalTransportAddress GetLocalAddress (SubChannels subchannel=e_Media) const
 
virtual OpalTransportAddress GetRemoteAddress (SubChannels subchannel=e_Media) const
 
virtual bool SetRemoteAddress (const OpalTransportAddress &remoteAddress, SubChannels subchannel=e_Media)
 
virtual void SetCandidates (const PString &user, const PString &pass, const PNatCandidateList &candidates)
 
virtual bool GetCandidates (PString &user, PString &pass, PNatCandidateList &candidates, bool offering)
 
virtual bool Write (const void *data, PINDEX length, SubChannels subchannel=e_Media, const PIPSocketAddressAndPort *remote=NULL, int *mtu=NULL)=0
 
void AddReadNotifier (const ReadNotifier &notifier, SubChannels subchannel=e_Media)
 
void RemoveReadNotifier (const ReadNotifier &notifier, SubChannels subchannel=e_Media)
 Remove the read notifier. More...
 
void RemoveReadNotifier (PObject *target, SubChannels subchannel=e_Media)
 
PChannel * GetChannel (SubChannels subchannel=e_Media) const
 
void SetDiscoverMTU (int mode)
 
void SetMediaTimeout (const PTimeInterval &t)
 
void SetRemoteBehindNAT ()
 
CongestionControlSetCongestionControl (CongestionControl *cc)
 
CongestionControlGetCongestionControl () const
 
virtual void GetStatistics (OpalMediaStatistics &statistics) const
 

Protected Types

enum  RemoteAddressSources {
  e_RemoteAddressUnknown, e_RemoteAddressFromSignalling, e_RemoteAddressFromFirstPacket, e_RemoteAddressFromProvisionalPair,
  e_RemoteAddressFromICE
}
 
typedef vector< ChannelInfoChannelArray
 

Protected Member Functions

virtual void InternalClose ()
 
virtual bool GarbageCollection ()
 
virtual void InternalRxData (SubChannels subchannel, const PBYTEArray &data)
 
virtual PTimeInterval GetTimeout () const
 
 PDECLARE_NOTIFIER (PTimer, OpalMediaTransport, ProcessCongestionControl)
 
void AddChannel (PChannel *channel)
 
virtual PChannel * AddWrapperChannels (SubChannels subchannel, PChannel *channel)
 

Protected Attributes

PString m_name
 
bool m_remoteBehindNAT
 
PINDEX m_packetSize
 
int m_mtuDiscoverMode
 
PTimeInterval m_mediaTimeout
 
PSimpleTimer m_mediaTimer
 
PTimeInterval m_maxNoTransmitTime
 
atomic< bool > m_opened
 
atomic< bool > m_established
 
atomic< bool > m_started
 
atomic< CongestionControl * > m_congestionControl
 
PTimer m_ccTimer
 
ChannelArray m_subchannels
 

Friends

struct ChannelInfo
 

Detailed Description

Class for low level transport of media

Member Typedef Documentation

typedef vector<ChannelInfo> OpalMediaTransport::ChannelArray
protected
typedef PNotifierTemplate<PBYTEArray> OpalMediaTransport::ReadNotifier

Read data notification. If PBYEArray is empty, then the transport has had an error and has been closed.

Member Enumeration Documentation

Enumerator
e_RemoteAddressUnknown 
e_RemoteAddressFromSignalling 
e_RemoteAddressFromFirstPacket 
e_RemoteAddressFromProvisionalPair 
e_RemoteAddressFromICE 

Constructor & Destructor Documentation

OpalMediaTransport::OpalMediaTransport ( const PString &  name)
OpalMediaTransport::~OpalMediaTransport ( )

Member Function Documentation

void OpalMediaTransport::AddChannel ( PChannel *  channel)
protected
void OpalMediaTransport::AddReadNotifier ( const ReadNotifier notifier,
SubChannels  subchannel = e_Media 
)

Set the notifier for read data.

virtual PChannel* OpalMediaTransport::AddWrapperChannels ( SubChannels  subchannel,
PChannel *  channel 
)
protectedvirtual
virtual bool OpalMediaTransport::GarbageCollection ( )
protectedvirtual
virtual bool OpalMediaTransport::GetCandidates ( PString &  user,
PString &  pass,
PNatCandidateList &  candidates,
bool  offering 
)
virtual

Get the candidates for use in this media transport.

PChannel* OpalMediaTransport::GetChannel ( SubChannels  subchannel = e_Media) const

Get channel object for subchannel index.

CongestionControl* OpalMediaTransport::GetCongestionControl ( ) const
inline

References m_congestionControl.

virtual OpalTransportAddress OpalMediaTransport::GetLocalAddress ( SubChannels  subchannel = e_Media) const
virtual

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

const PString& OpalMediaTransport::GetName ( ) const
inline

Return name of the transport.

References m_name.

virtual OpalTransportAddress OpalMediaTransport::GetRemoteAddress ( SubChannels  subchannel = e_Media) const
virtual

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

virtual void OpalMediaTransport::GetStatistics ( OpalMediaStatistics statistics) const
virtual

Get statistics for this media session.

virtual PTimeInterval OpalMediaTransport::GetTimeout ( ) const
inlineprotectedvirtual

References m_mediaTimeout.

virtual PString OpalMediaTransport::GetType ( )
virtual

Return the type of the transport.

virtual void OpalMediaTransport::InternalClose ( )
protectedvirtual
virtual void OpalMediaTransport::InternalRxData ( SubChannels  subchannel,
const PBYTEArray &  data 
)
protectedvirtual

Reimplemented in OpalUDPMediaTransport.

virtual bool OpalMediaTransport::IsEstablished ( ) const
virtual

Indicate session has completed any initial negotiations.

virtual bool OpalMediaTransport::IsOpen ( ) const
virtual

Indicate transport is open.

virtual bool OpalMediaTransport::Open ( OpalMediaSession session,
PINDEX  count,
const PString &  localInterface,
const OpalTransportAddress remoteAddress 
)
pure virtual

Open the media transport.

Implemented in OpalUDPMediaTransport, and OpalTCPMediaTransport.

OpalMediaTransport::PDECLARE_NOTIFIER ( PTimer  ,
OpalMediaTransport  ,
ProcessCongestionControl   
)
protected
virtual void OpalMediaTransport::PrintOn ( ostream &  strm) const
virtual
void OpalMediaTransport::RemoveReadNotifier ( const ReadNotifier notifier,
SubChannels  subchannel = e_Media 
)

Remove the read notifier.

void OpalMediaTransport::RemoveReadNotifier ( PObject *  target,
SubChannels  subchannel = e_Media 
)
virtual void OpalMediaTransport::SetCandidates ( const PString &  user,
const PString &  pass,
const PNatCandidateList &  candidates 
)
virtual

Set the candidates for use in this media transport.

CongestionControl* OpalMediaTransport::SetCongestionControl ( CongestionControl cc)
void OpalMediaTransport::SetDiscoverMTU ( int  mode)
inline

References m_mtuDiscoverMode.

void OpalMediaTransport::SetMediaTimeout ( const PTimeInterval &  t)
virtual bool OpalMediaTransport::SetRemoteAddress ( const OpalTransportAddress remoteAddress,
SubChannels  subchannel = e_Media 
)
virtual

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

Reimplemented in OpalUDPMediaTransport.

void OpalMediaTransport::SetRemoteBehindNAT ( )
virtual void OpalMediaTransport::Start ( )
virtual

Start threads to read from transport subchannels.

virtual bool OpalMediaTransport::Write ( const void *  data,
PINDEX  length,
SubChannels  subchannel = e_Media,
const PIPSocketAddressAndPort *  remote = NULL,
int *  mtu = NULL 
)
pure virtual

Write to media transport.

Implemented in OpalUDPMediaTransport, and OpalTCPMediaTransport.

Friends And Related Function Documentation

friend struct ChannelInfo
friend

Field Documentation

PTimer OpalMediaTransport::m_ccTimer
protected
atomic<CongestionControl *> OpalMediaTransport::m_congestionControl
protected

Referenced by GetCongestionControl().

atomic<bool> OpalMediaTransport::m_established
protected
PTimeInterval OpalMediaTransport::m_maxNoTransmitTime
protected
PTimeInterval OpalMediaTransport::m_mediaTimeout
protected

Referenced by GetTimeout().

PSimpleTimer OpalMediaTransport::m_mediaTimer
protected
int OpalMediaTransport::m_mtuDiscoverMode
protected

Referenced by SetDiscoverMTU().

PString OpalMediaTransport::m_name
protected

Referenced by GetName().

atomic<bool> OpalMediaTransport::m_opened
protected
PINDEX OpalMediaTransport::m_packetSize
protected
bool OpalMediaTransport::m_remoteBehindNAT
protected
atomic<bool> OpalMediaTransport::m_started
protected
ChannelArray OpalMediaTransport::m_subchannels
protected

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