#include <mediatype.h>
Inheritance diagram for OpalMediaTypeDefinition:

Public Member Functions | |
| OpalMediaTypeDefinition (const char *mediaType, const char *sdpType, unsigned preferredSessionId, OpalMediaType::AutoStartMode autoStart=OpalMediaType::DontOffer) | |
| Create a new media type definition. | |
| virtual | ~OpalMediaTypeDefinition () |
| OpalMediaType::AutoStartMode | GetAutoStart () const |
| void | SetAutoStart (OpalMediaType::AutoStartMode v) |
| 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 |
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 | m_mediaType |
| OpalMediaType::AutoStartMode | m_autoStart |
typedef std::map<OpalMediaType, unsigned> OpalMediaTypeDefinition::MediaTypeToSessionIDMap_T [protected] |
typedef std::map<unsigned, OpalMediaType> OpalMediaTypeDefinition::SessionIDToMediaTypeMap_T [protected] |
| OpalMediaTypeDefinition::OpalMediaTypeDefinition | ( | const char * | mediaType, | |
| const char * | sdpType, | |||
| unsigned | preferredSessionId, | |||
| OpalMediaType::AutoStartMode | autoStart = OpalMediaType::DontOffer | |||
| ) |
Create a new media type definition.
| mediaType | name of the media type (audio, video etc) |
| sdpType | name of the SDP type |
| preferredSessionId | preferred session ID |
| autoStart | Default value for auto-start transmit & receive |
| virtual OpalMediaTypeDefinition::~OpalMediaTypeDefinition | ( | ) | [inline, virtual] |
| OpalMediaType::AutoStartMode OpalMediaTypeDefinition::GetAutoStart | ( | ) | const [inline] |
Get flags for media type can auto-start on call initiation.
| void OpalMediaTypeDefinition::SetAutoStart | ( | OpalMediaType::AutoStartMode | v | ) | [inline] |
Set flag for media type can auto-start receive on call initiation.
| virtual bool OpalMediaTypeDefinition::UsesRTP | ( | ) | const [inline, virtual] |
Indicate type uses RTP for transport. If false, then it uses a generic OpaMediaSession
| virtual OpalMediaSession* OpalMediaTypeDefinition::CreateMediaSession | ( | OpalConnection & | connection, | |
| unsigned | sessionID | |||
| ) | const [virtual] |
Create a media session suitable for the media type.
| connection | Connection media session is being created for |
| sessionID | ID for the media session |
Reimplemented in OpalRTPAVPMediaType.
| 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 SimpleMediaType< Type, sdp >, and OpalRTPAVPMediaType.
| 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 >.
| unsigned OpalMediaTypeDefinition::GetDefaultSessionId | ( | ) | const [inline] |
Return the default session ID for this media type.
| static unsigned OpalMediaTypeDefinition::GetDefaultSessionId | ( | const OpalMediaType & | mediaType | ) | [static] |
Return the default session ID for a specified media type.
| mediaType | Media type to get default session ID for |
| static OpalMediaType OpalMediaTypeDefinition::GetMediaTypeForSessionId | ( | unsigned | sessionId | ) | [static] |
Return the media type associated with a default media type
| sessionId | Session ID to search for media type. |
| static PMutex& OpalMediaTypeDefinition::GetMapMutex | ( | ) | [static, protected] |
| static MediaTypeToSessionIDMap_T& OpalMediaTypeDefinition::GetMediaTypeToSessionIDMap | ( | ) | [static, protected] |
| static SessionIDToMediaTypeMap_T& OpalMediaTypeDefinition::GetSessionIDToMediaTypeMap | ( | ) | [static, protected] |
std::string OpalMediaTypeDefinition::m_mediaType [protected] |
1.5.1