# SDPMediaDescription Class Reference

`#include <sdp.h>`

Inheritance diagram for SDPMediaDescription:

[legend]
Collaboration diagram for SDPMediaDescription:
[legend]

## Public Member Functions

| SDPMediaDescription (const OpalTransportAddress &address, const OpalMediaType &mediaType)
virtual bool | PreEncode ()
virtual void | Encode (const OpalTransportAddress &commonAddr, ostream &str) const
virtual bool | Decode (const PStringArray &tokens)
virtual bool | Decode (char key, const PString &value)
virtual bool | PostDecode (const OpalMediaFormatList &mediaFormats)
virtual PString | GetSDPMediaType () const =0
virtual PCaselessString | GetSDPTransportType () const =0
virtual const SDPMediaFormatList & | GetSDPMediaFormats () const
virtual OpalMediaFormatList | GetMediaFormats () const
virtual void | AddSDPMediaFormat (SDPMediaFormat *sdpMediaFormat)
virtual void | AddMediaFormat (const OpalMediaFormat &mediaFormat)
virtual void | AddMediaFormats (const OpalMediaFormatList &mediaFormats, const OpalMediaType &mediaType)
virtual void | SetCryptoKeys (OpalMediaCryptoKeyList &cryptoKeys)
virtual OpalMediaCryptoKeyList | GetCryptoKeys () const
virtual void | SetAttribute (const PString &attr, const PString &value)
virtual Direction | GetDirection () const
virtual const OpalTransportAddress & | GetTransportAddress () const
virtual PBoolean | SetTransportAddress (const OpalTransportAddress &t)
virtual WORD | GetPort () const
virtual OpalMediaType | GetMediaType () const
virtual void | CreateSDPMediaFormats (const PStringArray &tokens)
virtual SDPMediaFormat * | CreateSDPMediaFormat (const PString &portString)=0
virtual PString | GetSDPPortList () const
virtual void | ProcessMediaOptions (SDPMediaFormat &sdpFormat, const OpalMediaFormat &mediaFormat)
virtual OpalVideoFormat::ContentRole | GetContentRole () const
void | SetOptionStrings (const PStringOptions &options)
const PStringOptions & | GetOptionStrings () const
virtual void | Copy (SDPMediaDescription &mediaDescription)

## Protected Member Functions

virtual SDPMediaFormat * | FindFormat (PString &str) const

## Protected Attributes

OpalTransportAddress | m_transportAddress
PCaselessString | m_transportType
PStringOptions | m_stringOptions
WORD | m_port
WORD | m_portCount
OpalMediaType | m_mediaType
SDPMediaFormatList | formats

## Constructor & Destructor Documentation

SDPMediaDescription::SDPMediaDescription | ( | const OpalTransportAddress & | address,
|  | const OpalMediaType & | mediaType |
| ) |  |  |

## Member Function Documentation

virtual void SDPMediaDescription::AddMediaFormat | ( | const OpalMediaFormat & | mediaFormat | ) | `[virtual]`

virtual void SDPMediaDescription::AddMediaFormats | ( | const OpalMediaFormatList & | mediaFormats,
|  | const OpalMediaType & | mediaType |
| ) |  |  | `[virtual]`

virtual void SDPMediaDescription::AddSDPMediaFormat | ( | SDPMediaFormat * | sdpMediaFormat | ) | `[virtual]`

virtual void SDPMediaDescription::Copy | ( | SDPMediaDescription & | mediaDescription | ) | `[virtual]`

Reimplemented in SDPDummyMediaDescription.

virtual SDPMediaFormat* SDPMediaDescription::CreateSDPMediaFormat | ( | const PString & | portString | ) | `[pure virtual]`

Implemented in SDPDummyMediaDescription, SDPRTPAVPMediaDescription, and SDPApplicationMediaDescription.

virtual void SDPMediaDescription::CreateSDPMediaFormats | ( | const PStringArray & | tokens | ) | `[virtual]`

virtual bool SDPMediaDescription::Decode | ( | char | key,
|  | const PString & | value |
| ) |  |  | `[virtual]`

virtual bool SDPMediaDescription::Decode | ( | const PStringArray & | tokens | ) | `[virtual]`

Reimplemented in SDPRTPAVPMediaDescription.

virtual void SDPMediaDescription::Encode | ( | const OpalTransportAddress & | commonAddr,
|  | ostream & | str |
| ) |  |  | const`[virtual]`

virtual SDPMediaFormat* SDPMediaDescription::FindFormat | ( | PString & | str | ) | const`[protected, virtual]`

virtual OpalVideoFormat::ContentRole SDPMediaDescription::GetContentRole | ( |  | ) | const`[inline, virtual]`

Reimplemented in SDPVideoMediaDescription.

virtual OpalMediaCryptoKeyList SDPMediaDescription::GetCryptoKeys | ( |  | ) | const`[virtual]`

Reimplemented in SDPRTPAVPMediaDescription.

virtual Direction SDPMediaDescription::GetDirection | ( |  | ) | const`[inline, virtual]`

Reimplemented from SDPCommonAttributes.

virtual OpalMediaFormatList SDPMediaDescription::GetMediaFormats | ( |  | ) | const`[virtual]`

virtual OpalMediaType SDPMediaDescription::GetMediaType | ( |  | ) | const`[inline, virtual]`

const PStringOptions& SDPMediaDescription::GetOptionStrings | ( |  | ) | const`[inline]`

virtual WORD SDPMediaDescription::GetPort | ( |  | ) | const`[inline, virtual]`

virtual const SDPMediaFormatList& SDPMediaDescription::GetSDPMediaFormats | ( |  | ) | const`[inline, virtual]`

virtual PString SDPMediaDescription::GetSDPMediaType | ( |  | ) | const`[pure virtual]`

Implemented in SDPDummyMediaDescription, SDPAudioMediaDescription, SDPVideoMediaDescription, and SDPApplicationMediaDescription.

virtual PString SDPMediaDescription::GetSDPPortList | ( |  | ) | const`[virtual]`

Reimplemented in SDPDummyMediaDescription, and SDPRTPAVPMediaDescription.

virtual PCaselessString SDPMediaDescription::GetSDPTransportType | ( |  | ) | const`[pure virtual]`

Implemented in SDPDummyMediaDescription, SDPRTPAVPMediaDescription, and SDPApplicationMediaDescription.

virtual const OpalTransportAddress& SDPMediaDescription::GetTransportAddress | ( |  | ) | const`[inline, virtual]`

virtual bool SDPMediaDescription::PostDecode | ( | const OpalMediaFormatList & | mediaFormats | ) | `[virtual]`

Reimplemented in SDPAudioMediaDescription, and SDPVideoMediaDescription.

virtual bool SDPMediaDescription::PreEncode | ( |  | ) | `[virtual]`

Reimplemented in SDPRTPAVPMediaDescription, and SDPVideoMediaDescription.

virtual void SDPMediaDescription::ProcessMediaOptions | ( | SDPMediaFormat & | sdpFormat,
|  | const OpalMediaFormat & | mediaFormat |
| ) |  |  | `[virtual]`

virtual void SDPMediaDescription::SetAttribute | ( | const PString & | attr,
|  | const PString & | value |
| ) |  |  | `[virtual]`

Reimplemented from SDPCommonAttributes.

Reimplemented in SDPRTPAVPMediaDescription, SDPAudioMediaDescription, and SDPVideoMediaDescription.

virtual void SDPMediaDescription::SetCryptoKeys | ( | OpalMediaCryptoKeyList & | cryptoKeys | ) | `[virtual]`

Reimplemented in SDPRTPAVPMediaDescription.

void SDPMediaDescription::SetOptionStrings | ( | const PStringOptions & | options | ) | `[inline]`

virtual PBoolean SDPMediaDescription::SetTransportAddress | ( | const OpalTransportAddress & | t | ) | `[virtual]`

## Field Documentation

SDPMediaFormatList SDPMediaDescription::formats `[protected]`

OpalMediaType SDPMediaDescription::m_mediaType `[protected]`

WORD SDPMediaDescription::m_port `[protected]`

WORD SDPMediaDescription::m_portCount `[protected]`

PStringOptions SDPMediaDescription::m_stringOptions `[protected]`

OpalTransportAddress SDPMediaDescription::m_transportAddress `[protected]`

PCaselessString SDPMediaDescription::m_transportType `[protected]`

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

- sdp.h