Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
headers.h File Reference

RTCP headers. More...

#include "roc_core/attributes.h"
#include "roc_core/endian.h"
#include "roc_core/panic.h"
#include "roc_core/stddefs.h"
#include "roc_packet/ntp.h"
#include "roc_packet/units.h"
Include dependency graph for headers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  roc::rtcp::header::NtpTimestamp
 Helper to store 64-bit ntp timestamp in a common way among RTCP. More...
 
class  roc::rtcp::header::PacketHeader
 RTCP packet header, common for all RTCP packet types. More...
 
class  roc::rtcp::header::ReceptionReportBlock
 Reception report block. More...
 
class  roc::rtcp::header::ReceiverReportPacket
 Receiver Report RTCP packet (RR). More...
 
class  roc::rtcp::header::SenderReportPacket
 Sender Report RTCP packet (SR). More...
 
class  roc::rtcp::header::SdesChunkHeader
 SDES chunk header. More...
 
class  roc::rtcp::header::SdesItemHeader
 SDES item header. More...
 
class  roc::rtcp::header::SdesPacket
 Source Description RTCP packet (SDES). More...
 
class  roc::rtcp::header::ByeSourceHeader
 BYE source header. More...
 
class  roc::rtcp::header::ByeReasonHeader
 BYE reason header. More...
 
class  roc::rtcp::header::ByePacket
 Goodbye RTCP packet (BYE). More...
 
class  roc::rtcp::header::XrPacket
 RTCP Extended Report Packet. More...
 
class  roc::rtcp::header::XrBlockHeader
 XR Block Header. More...
 
class  roc::rtcp::header::XrRrtrBlock
 XR Receiver Reference Time Report block. More...
 
class  roc::rtcp::header::XrDlrrSubblock
 XR DLRR Report sub-block. More...
 
class  roc::rtcp::header::XrDlrrBlock
 XR DLRR Report block. More...
 

Namespaces

 roc
 Root namespace.
 
 roc::rtcp
 RTCP protocol support.
 

Enumerations

enum  roc::rtcp::header::Version { roc::rtcp::header::V2 = 2 }
 RTP protocol version. More...
 
enum  roc::rtcp::header::PacketType {
  roc::rtcp::header::RTCP_SR = 200 , roc::rtcp::header::RTCP_RR = 201 , roc::rtcp::header::RTCP_SDES = 202 , roc::rtcp::header::RTCP_BYE = 203 ,
  roc::rtcp::header::RTCP_APP = 204 , roc::rtcp::header::RTCP_XR = 207
}
 RTCP packet type. More...
 
enum  roc::rtcp::header::SdesItemType {
  roc::rtcp::header::SDES_CNAME = 1 , roc::rtcp::header::SDES_NAME = 2 , roc::rtcp::header::SDES_EMAIL = 3 , roc::rtcp::header::SDES_PHONE = 4 ,
  roc::rtcp::header::SDES_LOC = 5 , roc::rtcp::header::SDES_TOOL = 6 , roc::rtcp::header::SDES_NOTE = 7 , roc::rtcp::header::SDES_PRIV = 8
}
 SDES item type. More...
 
enum  roc::rtcp::header::XrBlockType {
  roc::rtcp::header::XR_LOSS_RLE = 1 , roc::rtcp::header::XR_DUPLICATE_RLE = 2 , roc::rtcp::header::XR_PACKET_RECPT_TIME = 3 , roc::rtcp::header::XR_RRTR = 4 ,
  roc::rtcp::header::XR_DLRR = 5 , roc::rtcp::header::XR_STAT_SUMMARY = 6 , roc::rtcp::header::XR_VOIP_METRICS = 7
}
 XR Block Type. More...
 

Functions

template<typename T >
void roc::rtcp::header::set_bitfield (T &v0, const T v1, const size_t shift, const size_t mask)
 Set some bits in v0. More...
 
uint16_t roc::rtcp::header::size_t_2_rtcp_length (const size_t x)
 Computes the value of RTCP packet header length field from input number. More...
 
size_t roc::rtcp::header::rtcp_length_2_size_t (const size_t x)
 Converts RTCP header length field into conventional size_t value. More...
 
size_t roc::rtcp::header::padding_len (const size_t size, const size_t min_padding)
 How much padding bytes do we need in order to align with 32-bits. More...
 
template<class Blk , class Pkt >
Blk & roc::rtcp::header::get_block_by_index (Pkt *pkt, size_t block_index, size_t num_blocks, const char *pkt_type)
 Get a block that follows header, by index. More...
 

Detailed Description

RTCP headers.

Definition in file headers.h.

Enumeration Type Documentation

◆ PacketType

RTCP packet type.

Enumerator
RTCP_SR 

Sender report packet.

RTCP_RR 

Receiver report packet.

RTCP_SDES 

Source Description packet.

RTCP_BYE 

BYE packet.

RTCP_APP 

APP-specific packet.

RTCP_XR 

Extended report packet.

Definition at line 79 of file headers.h.

◆ SdesItemType

SDES item type.

Enumerator
SDES_CNAME 

Canonical End-Point Identifier.

SDES_NAME 

User Name.

SDES_EMAIL 

Electronic Mail Address.

SDES_PHONE 

Phone Number.

SDES_LOC 

Geographic User Location.

SDES_TOOL 

Application or Tool Name.

SDES_NOTE 

Notice/Status.

SDES_PRIV 

Private Extensions.

Definition at line 676 of file headers.h.

◆ Version

RTP protocol version.

Enumerator
V2 

RTP version 2.

Definition at line 74 of file headers.h.

◆ XrBlockType

XR Block Type.

Enumerator
XR_LOSS_RLE 

Loss RLE Report Block.

XR_DUPLICATE_RLE 

Duplicate RLE Report Block.

XR_PACKET_RECPT_TIME 

Packet Receipt Times Report Block.

XR_RRTR 

Receiver Reference Time Report Block.

XR_DLRR 

DLRR Report Block.

XR_STAT_SUMMARY 

Statistics Summary Report Block.

XR_VOIP_METRICS 

VoIP Metrics Report Block.

Definition at line 1021 of file headers.h.

Function Documentation

◆ get_block_by_index()

template<class Blk , class Pkt >
Blk& roc::rtcp::header::get_block_by_index ( Pkt *  pkt,
size_t  block_index,
size_t  num_blocks,
const char *  pkt_type 
)

Get a block that follows header, by index.

Definition at line 62 of file headers.h.

◆ padding_len()

size_t roc::rtcp::header::padding_len ( const size_t  size,
const size_t  min_padding 
)
inline

How much padding bytes do we need in order to align with 32-bits.

Parameters
sizedefines data length in bytes.
min_paddingdefines minimum number of padding bytes required.
Returns
How much should be added to x.

Definition at line 55 of file headers.h.

◆ rtcp_length_2_size_t()

size_t roc::rtcp::header::rtcp_length_2_size_t ( const size_t  x)
inline

Converts RTCP header length field into conventional size_t value.

Definition at line 46 of file headers.h.

◆ set_bitfield()

template<typename T >
void roc::rtcp::header::set_bitfield ( T &  v0,
const T  v1,
const size_t  shift,
const size_t  mask 
)

Set some bits in v0.

Parameters
v0Where to write the bits.
v1The bits to write.
shiftFrom which bit num the field start.
maskThe bitmask.

Definition at line 33 of file headers.h.

◆ size_t_2_rtcp_length()

uint16_t roc::rtcp::header::size_t_2_rtcp_length ( const size_t  x)
inline

Computes the value of RTCP packet header length field from input number.

Definition at line 39 of file headers.h.