# SDPMediaDescription Class Reference

`#include <sdp.h>`

Inheritance diagram for SDPMediaDescription:

[legend]
Collaboration diagram for SDPMediaDescription:
[legend]

## Public Types

| Undefined = -1
| Inactive
| RecvOnly
| SendOnly
| SendRecv
enum | Direction { Undefined = -1, Inactive, RecvOnly, SendOnly, SendRecv }

## Public Member Functions

| SDPMediaDescription (const OpalTransportAddress &address, const OpalMediaType &mediaType)
virtual bool | PreEncode ()
virtual void | Encode (const OpalTransportAddress &commonAddr, ostream &str) const
virtual bool | PrintOn (ostream &strm, const PString &str) const
virtual bool | Decode (const PStringArray &tokens)
virtual bool | Decode (char key, const PString &value)
virtual bool | PostDecode (const OpalMediaFormatList &mediaFormats)
virtual SDPMediaDescription * | CreateEmpty () const =0
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 | SetAttribute (const PString &attr, const PString &value)
virtual void | SetDirection (const Direction &d)
virtual Direction | GetDirection () const
virtual const OpalTransportAddress & | GetTransportAddress () const
virtual PBoolean | SetTransportAddress (const OpalTransportAddress &t)
virtual WORD | GetPort () const
virtual OpalMediaType | GetMediaType () const
virtual unsigned | GetBandwidth (const PString &type) const
virtual void | SetBandwidth (const PString &type, unsigned value)
virtual const SDPBandwidth & | GetBandwidth () const
virtual void | CreateSDPMediaFormats (const PStringArray &tokens)
virtual SDPMediaFormat * | CreateSDPMediaFormat (const PString &portString)=0
virtual PString | GetSDPPortList () const =0
virtual void | ProcessMediaOptions (SDPMediaFormat &sdpFormat, const OpalMediaFormat &mediaFormat)
unsigned | GetPTime () const
unsigned | GetMaxPTime () const

## Protected Member Functions

virtual SDPMediaFormat * | FindFormat (PString &str) const

## Protected Attributes

OpalTransportAddress | transportAddress
Direction | direction
WORD | port
WORD | portCount
OpalMediaType | mediaType
SDPMediaFormatList | formats
SDPBandwidth | bandwidth
unsigned | ptime
unsigned | maxptime

## Member Enumeration Documentation

enum SDPMediaDescription::Direction

Enumerator:

  Undefined |
  Inactive |
  RecvOnly |
  SendOnly |
  SendRecv |

## 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 SDPMediaDescription* SDPMediaDescription::CreateEmpty | ( |  | ) | const`[pure virtual]`

Implemented in SDPDummyMediaDescription, SDPAudioMediaDescription, SDPVideoMediaDescription, and SDPApplicationMediaDescription.

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]`

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

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

virtual const SDPBandwidth& SDPMediaDescription::GetBandwidth | ( |  | ) | const`[inline, virtual]`

virtual unsigned SDPMediaDescription::GetBandwidth | ( | const PString & | type | ) | const`[inline, virtual]`

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

unsigned SDPMediaDescription::GetMaxPTime | ( |  | ) | const`[inline]`

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

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

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

unsigned SDPMediaDescription::GetPTime | ( |  | ) | const`[inline]`

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`[pure virtual]`

Implemented in SDPDummyMediaDescription, SDPRTPAVPMediaDescription, and SDPApplicationMediaDescription.

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]`

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

Reimplemented in SDPVideoMediaDescription.

virtual bool SDPMediaDescription::PrintOn | ( | ostream & | strm,
|  | const PString & | str |
| ) |  |  | const`[virtual]`

Reimplemented in SDPRTPAVPMediaDescription, SDPAudioMediaDescription, and SDPVideoMediaDescription.

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

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

Reimplemented in SDPRTPAVPMediaDescription, SDPAudioMediaDescription, and SDPVideoMediaDescription.

virtual void SDPMediaDescription::SetBandwidth | ( | const PString & | type,
|  | unsigned | value |
| ) |  |  | `[inline, virtual]`

virtual void SDPMediaDescription::SetDirection | ( | const Direction & | d | ) | `[inline, virtual]`

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

## Field Documentation

SDPBandwidth SDPMediaDescription::bandwidth `[protected]`

Direction SDPMediaDescription::direction `[protected]`

SDPMediaFormatList SDPMediaDescription::formats `[protected]`

unsigned SDPMediaDescription::maxptime `[protected]`

OpalMediaType SDPMediaDescription::mediaType `[protected]`

WORD SDPMediaDescription::port `[protected]`

WORD SDPMediaDescription::portCount `[protected]`

unsigned SDPMediaDescription::ptime `[protected]`

OpalTransportAddress SDPMediaDescription::transportAddress `[protected]`

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

- sdp.h