|
OPAL
Version 3.14.3
|
#include <rtp.h>

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, T38 = 38, LastKnownPayloadType, StartConflictRTCP = RTP_ControlFrame::e_FirstValidPayloadType&0x7f, EndConflictRTCP = RTP_ControlFrame::e_LastValidPayloadType&0x7f, DynamicBase = 96, MaxPayloadType = 127, IllegalPayloadType } |
| enum | HeaderExtensionType { RFC3550, RFC5285_OneByte, RFC5285_TwoByte } |
| Extension header types. More... | |
Public Member Functions | |
| RTP_DataFrame (PINDEX payloadSize=0, PINDEX bufferSize=0) | |
| RTP_DataFrame (const BYTE *data, PINDEX len, bool dynamic=true) | |
| unsigned | GetVersion () const |
| bool | GetExtension () const |
| void | SetExtension (bool ext) |
| bool | GetMarker () const |
| void | SetMarker (bool m) |
| bool | GetPadding () const |
| void | SetPadding (bool v) |
| BYTE * | GetPaddingPtr () const |
| PINDEX | GetPaddingSize () const |
| bool | SetPaddingSize (PINDEX sz) |
| 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 |
| void | CopyHeader (const RTP_DataFrame &other) |
| void | Copy (const RTP_DataFrame &other) |
| BYTE * | GetHeaderExtension (unsigned &id, PINDEX &length, int idx=-1) const |
| BYTE * | GetHeaderExtension (HeaderExtensionType type, unsigned id, PINDEX &length) const |
| bool | SetHeaderExtension (unsigned id, PINDEX length, const BYTE *data, HeaderExtensionType type) |
| PINDEX | GetExtensionSizeDWORDs () const |
| bool | SetExtensionSizeDWORDs (PINDEX sz) |
| PINDEX | GetPayloadSize () const |
| bool | SetPayloadSize (PINDEX sz) |
| BYTE * | GetPayloadPtr () const |
| virtual PObject * | Clone () const |
| bool | SetPacketSize (PINDEX sz) |
| PINDEX | GetPacketSize () const |
| PTime | GetAbsoluteTime () const |
| void | SetAbsoluteTime () |
| void | SetAbsoluteTime (const PTime &t) |
| unsigned | GetDiscontinuity () const |
| void | SetDiscontinuity (unsigned lost) |
Protected Member Functions | |
| bool | AdjustHeaderSize (PINDEX newSize) |
Protected Attributes | |
| PINDEX | m_headerSize |
| PINDEX | m_payloadSize |
| PINDEX | m_paddingSize |
| PTime | m_absoluteTime |
| unsigned | m_discontinuity |
An RTP data frame encapsulation.
| RTP_DataFrame::RTP_DataFrame | ( | PINDEX | payloadSize = 0, |
| PINDEX | bufferSize = 0 |
||
| ) |
Referenced by Clone().
| RTP_DataFrame::RTP_DataFrame | ( | const BYTE * | data, |
| PINDEX | len, | ||
| bool | dynamic = true |
||
| ) |
|
protected |
|
inlinevirtual |
References RTP_DataFrame().
| void RTP_DataFrame::Copy | ( | const RTP_DataFrame & | other | ) |
| void RTP_DataFrame::CopyHeader | ( | const RTP_DataFrame & | other | ) |
|
inline |
Get absolute (wall clock) time of packet, if known.
References m_absoluteTime.
| DWORD RTP_DataFrame::GetContribSource | ( | PINDEX | idx | ) | const |
|
inline |
|
inline |
Get sequence number discontinuity. If non-zero this indicates the number of packets detected as missing before this packet.
References m_discontinuity.
|
inline |
| PINDEX RTP_DataFrame::GetExtensionSizeDWORDs | ( | ) | const |
| BYTE* RTP_DataFrame::GetHeaderExtension | ( | unsigned & | id, |
| PINDEX & | length, | ||
| int | idx = -1 |
||
| ) | const |
Get header extension. If idx < 0 then gets RFC 3550 format extension type. If idx >= 0 then get RFC 5285 format extension type for the idx'th extension.
| id | Identifier for extension |
| length | Length of extension in bytes |
| idx | Index of extension |
| BYTE* RTP_DataFrame::GetHeaderExtension | ( | HeaderExtensionType | type, |
| unsigned | id, | ||
| PINDEX & | length | ||
| ) | const |
Get header extension by specified id.
| type | Type of extension to get |
| id | Identifier for extension |
| length | Length of extension in bytes |
|
inline |
References m_headerSize.
|
inline |
| PINDEX RTP_DataFrame::GetPacketSize | ( | ) | const |
|
inline |
|
inline |
References m_headerSize, and m_payloadSize.
|
inline |
References m_paddingSize.
|
inline |
References m_headerSize.
Referenced by OpalT140RTPFrame::AsString().
|
inline |
References m_payloadSize.
Referenced by OpalT140RTPFrame::AsString().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set absolute (wall clock) time of packet.
References m_absoluteTime.
|
inline |
References m_absoluteTime.
| void RTP_DataFrame::SetContribSource | ( | PINDEX | idx, |
| DWORD | src | ||
| ) |
|
inline |
References m_discontinuity.
| void RTP_DataFrame::SetExtension | ( | bool | ext | ) |
| bool RTP_DataFrame::SetExtensionSizeDWORDs | ( | PINDEX | sz | ) |
| bool RTP_DataFrame::SetHeaderExtension | ( | unsigned | id, |
| PINDEX | length, | ||
| const BYTE * | data, | ||
| HeaderExtensionType | type | ||
| ) |
Set header extension. Note when RFC 5285 formats are used, the extension is appened to ones already present.
| id | Identifier for extension |
| length | Length of extension in bytes |
| data | Data to put into extension |
| type | RFC standard used |
| void RTP_DataFrame::SetMarker | ( | bool | m | ) |
| bool RTP_DataFrame::SetPacketSize | ( | PINDEX | sz | ) |
|
inline |
| bool RTP_DataFrame::SetPaddingSize | ( | PINDEX | sz | ) |
| bool RTP_DataFrame::SetPayloadSize | ( | PINDEX | sz | ) |
| void RTP_DataFrame::SetPayloadType | ( | PayloadTypes | t | ) |
|
inline |
|
inline |
|
inline |
|
protected |
Referenced by GetAbsoluteTime(), and SetAbsoluteTime().
|
protected |
Referenced by GetDiscontinuity(), and SetDiscontinuity().
|
protected |
Referenced by GetHeaderSize(), GetPaddingPtr(), and GetPayloadPtr().
|
protected |
Referenced by GetPaddingSize().
|
protected |
Referenced by GetPaddingPtr(), and GetPayloadSize().