OPAL
Version 3.18.8
|
#include <mediasession.h>
Data Structures | |
struct | ChannelInfo |
struct | CongestionControl |
Congestion control handling. More... | |
Public Types | |
typedef PNotifierTemplate < PBYTEArray > | ReadNotifier |
![]() | |
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 ¬ifier, SubChannels subchannel=e_Media) |
void | RemoveReadNotifier (const ReadNotifier ¬ifier, 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 () |
CongestionControl * | SetCongestionControl (CongestionControl *cc) |
CongestionControl * | GetCongestionControl () const |
virtual void | GetStatistics (OpalMediaStatistics &statistics) const |
Protected Types | |
enum | RemoteAddressSources { e_RemoteAddressUnknown, e_RemoteAddressFromSignalling, e_RemoteAddressFromFirstPacket, e_RemoteAddressFromProvisionalPair, e_RemoteAddressFromICE } |
typedef vector< ChannelInfo > | ChannelArray |
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 |
Class for low level transport of media
|
protected |
typedef PNotifierTemplate<PBYTEArray> OpalMediaTransport::ReadNotifier |
Read data notification. If PBYEArray is empty, then the transport has had an error and has been closed.
|
protected |
OpalMediaTransport::OpalMediaTransport | ( | const PString & | name | ) |
OpalMediaTransport::~OpalMediaTransport | ( | ) |
|
protected |
void OpalMediaTransport::AddReadNotifier | ( | const ReadNotifier & | notifier, |
SubChannels | subchannel = e_Media |
||
) |
Set the notifier for read data.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Get the candidates for use in this media transport.
PChannel* OpalMediaTransport::GetChannel | ( | SubChannels | subchannel = e_Media | ) | const |
Get channel object for subchannel index.
|
inline |
References m_congestionControl.
|
virtual |
Get the local transport address used by this media session. The subchannel
can get an optional secondary channel address when false.
|
inline |
Return name of the transport.
References m_name.
|
virtual |
Get the remote transport address used by this media session. The subchannel
can get an optional secondary channel address when false.
|
virtual |
Get statistics for this media session.
|
inlineprotectedvirtual |
References m_mediaTimeout.
|
virtual |
Return the type of the transport.
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in OpalUDPMediaTransport.
|
virtual |
Indicate session has completed any initial negotiations.
|
virtual |
Indicate transport is open.
|
pure virtual |
Open the media transport.
Implemented in OpalUDPMediaTransport, and OpalTCPMediaTransport.
|
protected |
|
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 |
Set the candidates for use in this media transport.
CongestionControl* OpalMediaTransport::SetCongestionControl | ( | CongestionControl * | cc | ) |
|
inline |
References m_mtuDiscoverMode.
void OpalMediaTransport::SetMediaTimeout | ( | const PTimeInterval & | t | ) |
|
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 |
Start threads to read from transport subchannels.
|
pure virtual |
Write to media transport.
Implemented in OpalUDPMediaTransport, and OpalTCPMediaTransport.
|
friend |
|
protected |
|
protected |
Referenced by GetCongestionControl().
|
protected |
|
protected |
|
protected |
Referenced by GetTimeout().
|
protected |
|
protected |
Referenced by SetDiscoverMTU().
|
protected |
Referenced by GetName().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |