# RTP_DataFrame Class Reference

`#include <rtp.h>`

Inheritance diagram for RTP_DataFrame:

List of all members.

## Public Types

enum | { ProtocolVersion = 2, MinHeaderSize = 12, MaxMtuPayloadSize = (576-20-16-12) }
enum | PayloadTypes { PCMU, FS1016, G721, G726 = G721, GSM, G7231, DVI4_8k, DVI4_16k, LPC, PCMA, G722, L16_Stereo, L16_Mono, G723, CN, MPA, G728, DVI4_11k, DVI4_22k, G729, Cisco_CN, CelB = 25, JPEG, H261 = 31, MPV, MP2T, H263, LastKnownPayloadType, DynamicBase = 96, MaxPayloadType = 127, IllegalPayloadType }

## Public Member Functions

| RTP_DataFrame (PINDEX payloadSize=2048)
| RTP_DataFrame (const BYTE *data, PINDEX len, PBoolean dynamic=PTrue)
unsigned | GetVersion () const
PBoolean | GetExtension () const
void | SetExtension (PBoolean ext)
PBoolean | GetMarker () const
void | SetMarker (PBoolean m)
bool | GetPadding () const
void | SetPadding (bool v)
unsigned | GetPaddingSize () const
PayloadTypes | GetPayloadType () const
void | SetPayloadType (PayloadTypes t)
WORD | GetSequenceNumber () const
void | SetSequenceNumber (WORD n)
DWORD | GetTimestamp () const
void | SetTimestamp (DWORD t)
DWORD | GetSyncSource () const
void | SetSyncSource (DWORD s)
PINDEX | GetContribSrcCount () const
DWORD | GetContribSource (PINDEX idx) const
void | SetContribSource (PINDEX idx, DWORD src)
PINDEX | GetHeaderSize () const
int | GetExtensionType () const
void | SetExtensionType (int type)
PINDEX | GetExtensionSize () const
PBoolean | SetExtensionSize (PINDEX sz)
BYTE * | GetExtensionPtr () const
PINDEX | GetPayloadSize () const
PBoolean | SetPayloadSize (PINDEX sz)
BYTE * | GetPayloadPtr () const
virtual void | PrintOn (ostream &strm) const

## Protected Attributes

PINDEX | payloadSize

## Detailed Description

An RTP data frame encapsulation.

## Member Enumeration Documentation

anonymous enum

Enumerator:

  ProtocolVersion |
  MinHeaderSize |
  MaxMtuPayloadSize |

enum RTP_DataFrame::PayloadTypes

Enumerator:

  PCMU |
  FS1016 |
  G721 |
  G726 |
  GSM |
  G7231 |
  DVI4_8k |
  DVI4_16k |
  LPC |
  PCMA |
  G722 |
  L16_Stereo |
  L16_Mono |
  G723 |
  CN |
  MPA |
  G728 |
  DVI4_11k |
  DVI4_22k |
  G729 |
  Cisco_CN |
  CelB |
  JPEG |
  H261 |
  MPV |
  MP2T |
  H263 |
  LastKnownPayloadType |
  DynamicBase |
  MaxPayloadType |
  IllegalPayloadType |

## Constructor & Destructor Documentation

RTP_DataFrame::RTP_DataFrame | ( | PINDEX | payloadSize = `2048` | ) |

RTP_DataFrame::RTP_DataFrame | ( | const BYTE * | data,
|  | PINDEX | len,
|  | PBoolean | dynamic = `PTrue` |
| ) |  |  |

## Member Function Documentation

unsigned RTP_DataFrame::GetVersion | ( |  | ) | const`[inline]`

PBoolean RTP_DataFrame::GetExtension | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetExtension | ( | PBoolean | ext | ) |

PBoolean RTP_DataFrame::GetMarker | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetMarker | ( | PBoolean | m | ) |

bool RTP_DataFrame::GetPadding | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetPadding | ( | bool | v | ) | `[inline]`

unsigned RTP_DataFrame::GetPaddingSize | ( |  | ) | const

PayloadTypes RTP_DataFrame::GetPayloadType | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetPayloadType | ( | PayloadTypes | t | ) |

WORD RTP_DataFrame::GetSequenceNumber | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetSequenceNumber | ( | WORD | n | ) | `[inline]`

DWORD RTP_DataFrame::GetTimestamp | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetTimestamp | ( | DWORD | t | ) | `[inline]`

DWORD RTP_DataFrame::GetSyncSource | ( |  | ) | const`[inline]`

void RTP_DataFrame::SetSyncSource | ( | DWORD | s | ) | `[inline]`

PINDEX RTP_DataFrame::GetContribSrcCount | ( |  | ) | const`[inline]`

DWORD RTP_DataFrame::GetContribSource | ( | PINDEX | idx | ) | const

void RTP_DataFrame::SetContribSource | ( | PINDEX | idx,
|  | DWORD | src |
| ) |  |  |

PINDEX RTP_DataFrame::GetHeaderSize | ( |  | ) | const

int RTP_DataFrame::GetExtensionType | ( |  | ) | const

void RTP_DataFrame::SetExtensionType | ( | int | type | ) |

PINDEX RTP_DataFrame::GetExtensionSize | ( |  | ) | const

PBoolean RTP_DataFrame::SetExtensionSize | ( | PINDEX | sz | ) |

BYTE* RTP_DataFrame::GetExtensionPtr | ( |  | ) | const

PINDEX RTP_DataFrame::GetPayloadSize | ( |  | ) | const`[inline]`

PBoolean RTP_DataFrame::SetPayloadSize | ( | PINDEX | sz | ) |

BYTE* RTP_DataFrame::GetPayloadPtr | ( |  | ) | const`[inline]`

virtual void RTP_DataFrame::PrintOn | ( | ostream & | strm | ) | const`[virtual]`

## Member Data Documentation

PINDEX RTP_DataFrame::payloadSize `[protected]`

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

- rtp.h