sipxmedialib
Version 3.3
Main Page
Related Pages
Classes
Files
File List
File Members
include
rtcp
RTCPHeader.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2006-2013 SIPez LLC. All rights reserved.
3
//
4
// Copyright (C) 2004-2006 SIPfoundry Inc.
5
// Licensed by SIPfoundry under the LGPL license.
6
//
7
// Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
8
// Licensed to SIPfoundry under a Contributor Agreement.
9
//
10
// $$
12
13
14
// Border Guard
15
#ifndef _RTCPHeader_h
16
#define _RTCPHeader_h
17
18
#include "
rtcp/RtcpConfig.h
"
19
20
// Includes
21
#include "
BaseClass.h
"
22
#include "
IRTCPHeader.h
"
23
24
25
// Defines
26
#define MAX_SOURCE_LENGTH 256 // Max Length of a NULL terminated SDES element
27
#define HEADER_LENGTH 8 // Header Size
28
29
#define PAYLOAD_OFFSET 1
30
#define LENGTH_OFFSET 2
31
#define SSRC_OFFSET 4
32
#define COUNT_MASK 0x1F
33
34
51
class
CRTCPHeader
52
{
53
54
// Public Methods
55
public
:
56
80
CRTCPHeader
(
ssrc_t
ulSSRC,
81
RTCP_REPORTS_ET
etPayloadType,
82
unsigned
long
ulVersion=2);
83
84
85
104
virtual
~CRTCPHeader
(
void
);
105
142
static
int
VetPacket
(
unsigned
char
* buffer,
int
bufferLen);
143
162
virtual
unsigned
long
GetHeaderLength
(
void
);
163
181
virtual
unsigned
long
GetVersion
(
void
);
182
200
virtual
unsigned
long
GetPadding
(
void
);
201
219
virtual
RTCP_REPORTS_ET
GetPayload
(
void
);
220
221
239
virtual
unsigned
long
GetReportCount
(
void
);
240
241
259
virtual
unsigned
long
GetReportLength
(
void
);
260
278
virtual
ssrc_t
GetSSRC
(
void
);
279
298
virtual
void
SetSSRC
(
ssrc_t
ulSSRC);
299
319
virtual
bool
IsOurSSRC
(
ssrc_t
ulSSRC);
320
321
protected
:
// Protected Methods
322
323
347
unsigned
long
FormatRTCPHeader
(
unsigned
char
*puchRTCPBuffer,
348
unsigned
long
ulPadding,
349
unsigned
long
ulCount,
350
unsigned
long
ulPayloadLength);
351
352
374
bool
ParseRTCPHeader
(
unsigned
char
*puchRTCPBuffer);
375
376
377
378
protected
:
// Protected Data Members
379
380
381
391
unsigned
long
m_ulVersion
;
392
402
unsigned
long
m_ulPadding
;
403
413
unsigned
long
m_ulCount
;
414
415
425
RTCP_REPORTS_ET
m_etPayloadType
;
426
436
unsigned
long
m_ulLength
;
437
448
unsigned
long
m_ulSSRC
;
449
450
451
};
452
453
454
#endif
IRTCPHeader.h
CRTCPHeader::m_ulPadding
unsigned long m_ulPadding
Definition:
RTCPHeader.h:402
CRTCPHeader::IsOurSSRC
virtual bool IsOurSSRC(ssrc_t ulSSRC)
CRTCPHeader::GetReportCount
virtual unsigned long GetReportCount(void)
CRTCPHeader::m_ulSSRC
unsigned long m_ulSSRC
Definition:
RTCPHeader.h:448
CRTCPHeader::m_ulLength
unsigned long m_ulLength
Definition:
RTCPHeader.h:436
CRTCPHeader::~CRTCPHeader
virtual ~CRTCPHeader(void)
CRTCPHeader::GetPayload
virtual RTCP_REPORTS_ET GetPayload(void)
RTCP_REPORTS_ET
RTCP_REPORTS_ET
Definition:
IRTCPHeader.h:23
CRTCPHeader::FormatRTCPHeader
unsigned long FormatRTCPHeader(unsigned char *puchRTCPBuffer, unsigned long ulPadding, unsigned long ulCount, unsigned long ulPayloadLength)
CRTCPHeader::m_ulCount
unsigned long m_ulCount
Definition:
RTCPHeader.h:413
CRTCPHeader::SetSSRC
virtual void SetSSRC(ssrc_t ulSSRC)
CRTCPHeader::GetHeaderLength
virtual unsigned long GetHeaderLength(void)
CRTCPHeader::GetPadding
virtual unsigned long GetPadding(void)
CRTCPHeader
Definition:
RTCPHeader.h:51
CRTCPHeader::m_etPayloadType
RTCP_REPORTS_ET m_etPayloadType
Definition:
RTCPHeader.h:425
CRTCPHeader::ParseRTCPHeader
bool ParseRTCPHeader(unsigned char *puchRTCPBuffer)
ssrc_t
uint32_t ssrc_t
Definition:
RtcpConfig.h:62
CRTCPHeader::m_ulVersion
unsigned long m_ulVersion
Definition:
RTCPHeader.h:391
CRTCPHeader::GetReportLength
virtual unsigned long GetReportLength(void)
CRTCPHeader::CRTCPHeader
CRTCPHeader(ssrc_t ulSSRC, RTCP_REPORTS_ET etPayloadType, unsigned long ulVersion=2)
CRTCPHeader::VetPacket
static int VetPacket(unsigned char *buffer, int bufferLen)
CRTCPHeader::GetSSRC
virtual ssrc_t GetSSRC(void)
BaseClass.h
CRTCPHeader::GetVersion
virtual unsigned long GetVersion(void)
RtcpConfig.h
Generated by
1.8.11