# OpalMediaTypeDefinition Class Reference

`#include <mediatype.h>`

Inheritance diagram for OpalMediaTypeDefinition:

List of all members.

## Public Member Functions

| OpalMediaTypeDefinition (const char *mediaType, const char *sdpType, unsigned preferredSessionId)
virtual | ~OpalMediaTypeDefinition ()
virtual PString | GetRTPEncoding () const=0
virtual RTP_UDP * | CreateRTPSession (OpalRTPConnection &conn, OpalSecurityMode *securityMode, unsigned sessionID, bool remoteIsNAT)
unsigned | GetDefaultSessionId ()

## Static Public Member Functions

static unsigned | GetDefaultSessionId (const OpalMediaType &mediaType)
static OpalMediaType | GetMediaTypeForSessionId (unsigned sessionId)

## Protected Types

typedef std::map< OpalMediaType, unsigned > | MediaTypeToSessionIDMap_T
typedef std::map< unsigned, OpalMediaType > | SessionIDToMediaTypeMap_T

## Static Protected Member Functions

static PMutex & | GetMapMutex ()
static MediaTypeToSessionIDMap_T & | GetMediaTypeToSessionIDMap ()
static SessionIDToMediaTypeMap_T & | GetSessionIDToMediaTypeMap ()

## Protected Attributes

std::string | mediaType

## Member Typedef Documentation

typedef std::map<OpalMediaType, unsigned> OpalMediaTypeDefinition::MediaTypeToSessionIDMap_T `[protected]`

typedef std::map<unsigned, OpalMediaType> OpalMediaTypeDefinition::SessionIDToMediaTypeMap_T `[protected]`

## Constructor & Destructor Documentation

OpalMediaTypeDefinition::OpalMediaTypeDefinition | ( | const char * | mediaType,
|  | const char * | sdpType,
|  | unsigned | preferredSessionId |
| ) |  |  |

virtual OpalMediaTypeDefinition::~OpalMediaTypeDefinition | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual PString OpalMediaTypeDefinition::GetRTPEncoding | ( |  | ) | const`[pure virtual]`

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

virtual RTP_UDP* OpalMediaTypeDefinition::CreateRTPSession | ( | OpalRTPConnection & | conn,
|  | OpalSecurityMode * | securityMode,
|  | unsigned | sessionID,
|  | bool | remoteIsNAT |
| ) |  |  | `[virtual]`

unsigned OpalMediaTypeDefinition::GetDefaultSessionId | ( |  | ) | `[inline]`

static unsigned OpalMediaTypeDefinition::GetDefaultSessionId | ( | const OpalMediaType & | mediaType | ) | `[static]`

static OpalMediaType OpalMediaTypeDefinition::GetMediaTypeForSessionId | ( | unsigned | sessionId | ) | `[static]`

static PMutex& OpalMediaTypeDefinition::GetMapMutex | ( |  | ) | `[static, protected]`

static MediaTypeToSessionIDMap_T& OpalMediaTypeDefinition::GetMediaTypeToSessionIDMap | ( |  | ) | `[static, protected]`

static SessionIDToMediaTypeMap_T& OpalMediaTypeDefinition::GetSessionIDToMediaTypeMap | ( |  | ) | `[static, protected]`

## Member Data Documentation

std::string OpalMediaTypeDefinition::mediaType `[protected]`

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

- mediatype.h