OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Protected Attributes
OpalMediaTypeDefinition Class Reference

`#include <mediatype.h>`

Inheritance diagram for OpalMediaTypeDefinition:

## Public Member Functions

| OpalMediaTypeDefinition (const char *mediaType, const char *sdpType, unsigned requiredSessionId=0, OpalMediaType::AutoStartMode autoStart=OpalMediaType::DontOffer)
| Create a new media type definition.
virtual | ~OpalMediaTypeDefinition ()
OpalMediaType::AutoStartMode | GetAutoStart () const
void | SetAutoStart (OpalMediaType::AutoStartMode v)
void | SetAutoStart (OpalMediaType::AutoStartMode v, bool on)
virtual bool | UsesRTP () const
virtual OpalMediaSession * | CreateMediaSession (OpalConnection &connection, unsigned sessionID) const
virtual PString | GetRTPEncoding () const =0
virtual RTP_UDP * | CreateRTPSession (OpalRTPConnection &conn, unsigned sessionID, bool remoteIsNAT)
unsigned | GetDefaultSessionId () const
virtual std::string | GetSDPType () const
virtual SDPMediaDescription * | CreateSDPMediaDescription (const OpalTransportAddress &localAddress)=0

## Protected Attributes

std::string | m_mediaType
unsigned | m_defaultSessionId
OpalMediaType::AutoStartMode | m_autoStart
std::string | m_sdpType

## Detailed Description

This class defines the type used to define the attributes of a media type

## Constructor & Destructor Documentation

OpalMediaTypeDefinition::OpalMediaTypeDefinition | ( | const char * | mediaType,
|  | const char * | sdpType,
|  | unsigned | requiredSessionId = `0`,
|  | OpalMediaType::AutoStartMode | autoStart = `OpalMediaType::DontOffer`
| ) |  |

Create a new media type definition.

Parameters:

  mediaType | name of the media type (audio, video etc)
  sdpType | name of the SDP type
  requiredSessionId | Session ID to use, asserts if already in use
  autoStart | Default value for auto-start transmit & receive

virtual OpalMediaTypeDefinition::~OpalMediaTypeDefinition | ( |  | ) |

virtual

## Member Function Documentation

virtual OpalMediaSession* OpalMediaTypeDefinition::CreateMediaSession | ( | OpalConnection & | connection,
|  | unsigned | sessionID
| ) |  | const

virtual

Create a media session suitable for the media type.

Parameters:

  connection | Connection media session is being created for
  sessionID | ID for the media session

Reimplemented in OpalRTPAVPMediaType, OpalMSRPMediaType, and OpalSIPIMMediaType.

virtual RTP_UDP* OpalMediaTypeDefinition::CreateRTPSession | ( | OpalRTPConnection & | conn,
|  | unsigned | sessionID,
|  | bool | remoteIsNAT
| ) |  |

virtual

Create an RTP session for this media format. By default, this will create a RTP_UDP session with the correct initial format

Only valid if UsesRTP return true

Reimplemented in SimpleMediaType< Type, sdp >, and OpalIMMediaType.

virtual SDPMediaDescription* OpalMediaTypeDefinition::CreateSDPMediaDescription | ( | const OpalTransportAddress & | localAddress | ) |

pure virtual

Implemented in OpalVideoMediaType, OpalAudioMediaType, SimpleMediaType< Type, sdp >, OpalH224MediaType, OpalMSRPMediaType, OpalSIPIMMediaType, and OpalT140MediaType.

OpalMediaType::AutoStartMode OpalMediaTypeDefinition::GetAutoStart | ( |  | ) | const

inline

Get flags for media type can auto-start on call initiation.

References m_autoStart.

Referenced by OpalMediaType::GetAutoStart().

unsigned OpalMediaTypeDefinition::GetDefaultSessionId | ( |  | ) | const

inline

Return the default session ID for this media type.

References m_defaultSessionId.

virtual PString OpalMediaTypeDefinition::GetRTPEncoding | ( |  | ) | const

pure virtual

Get the string used for the RTP_FormatHandler PFactory which is used to create the RTP handler for the this media type possible values include "rtp/avp" and "udptl"

Only valid if UsesRTP return true

Implemented in OpalRTPAVPMediaType, SimpleMediaType< Type, sdp >, and OpalIMMediaType.

virtual std::string OpalMediaTypeDefinition::GetSDPType | ( |  | ) | const

inline virtual

References m_sdpType.

void OpalMediaTypeDefinition::SetAutoStart | ( | OpalMediaType::AutoStartMode | v | ) |

inline

Set flag for media type can auto-start receive on call initiation.

References m_autoStart.

Referenced by OpalManager::SetAutoStartReceiveVideo(), and OpalManager::SetAutoStartTransmitVideo().

void OpalMediaTypeDefinition::SetAutoStart | ( | OpalMediaType::AutoStartMode | v,
|  | bool | on
| ) |  |

inline

References m_autoStart.

virtual bool OpalMediaTypeDefinition::UsesRTP | ( |  | ) | const

inline virtual

Indicate type uses RTP for transport. If false, then it uses a generic OpaMediaSession

Reimplemented in OpalIMMediaType.

## Field Documentation

OpalMediaType::AutoStartMode OpalMediaTypeDefinition::m_autoStart

protected

Referenced by GetAutoStart(), and SetAutoStart().

unsigned OpalMediaTypeDefinition::m_defaultSessionId

protected

Referenced by GetDefaultSessionId().

std::string OpalMediaTypeDefinition::m_mediaType

protected

std::string OpalMediaTypeDefinition::m_sdpType

protected

Referenced by GetSDPType().

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

- mediatype.h