Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::header::SenderReportPacket Class Reference

Sender Report RTCP packet (SR). More...

#include <headers.h>

Public Member Functions

void reset ()
 Reset to initial state (all zeros). More...
 
const PacketHeaderheader () const
 Get common packet header. More...
 
PacketHeaderheader ()
 Get common packet header. More...
 
uint32_t ssrc () const
 Get SSRC of sender. More...
 
void set_ssrc (const uint32_t s)
 Set SSRC of sender. More...
 
packet::ntp_timestamp_t ntp_timestamp () const
 Get NTP timestamp. More...
 
void set_ntp_timestamp (const packet::ntp_timestamp_t t)
 Set NTP timestamp. More...
 
uint32_t rtp_timestamp () const
 Get RTP timestamp. More...
 
void set_rtp_timestamp (const uint32_t &t)
 Get RTP timestamp. More...
 
size_t packet_count () const
 Get packet count. More...
 
void set_packet_count (const size_t cnt)
 Set packet count. More...
 
size_t byte_count () const
 Get byte count. More...
 
void set_byte_count (const size_t cnt)
 Set byte count. More...
 
size_t num_blocks () const
 Get number of blocks. More...
 
const ReceptionReportBlockget_block (const size_t i) const
 Get reception block by index. More...
 
ReceptionReportBlockget_block (const size_t i)
 Get reception block by index. More...
 

Detailed Description

Sender Report RTCP packet (SR).

RFC 3550 6.4.1. "SR: Sender Report RTCP packet"

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
header |V=2|P| RC | PT=SR=200 | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of sender |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
sender | NTP timestamp, most significant word |
info +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NTP timestamp, least significant word |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RTP timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sender's packet count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sender's octet count |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
report | SSRC_1 (SSRC of first source) |
block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1 | fraction lost | cumulative number of packets lost |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| extended highest sequence number received |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| interarrival jitter |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| last SR (LSR) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| delay since last SR (DLSR) |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
report | SSRC_2 (SSRC of second source) |
block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2 : ... :
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| profile-specific extensions |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
const PacketHeader & header() const
Get common packet header.
Definition: headers.h:598
nanoseconds_t timestamp(clock_t clock)
Get current timestamp in nanoseconds.

Definition at line 571 of file headers.h.

Member Function Documentation

◆ byte_count()

size_t roc::rtcp::header::SenderReportPacket::byte_count ( ) const
inline

Get byte count.

Definition at line 648 of file headers.h.

◆ get_block() [1/2]

ReceptionReportBlock& roc::rtcp::header::SenderReportPacket::get_block ( const size_t  i)
inline

Get reception block by index.

Definition at line 669 of file headers.h.

◆ get_block() [2/2]

const ReceptionReportBlock& roc::rtcp::header::SenderReportPacket::get_block ( const size_t  i) const
inline

Get reception block by index.

Definition at line 663 of file headers.h.

◆ header() [1/2]

PacketHeader& roc::rtcp::header::SenderReportPacket::header ( )
inline

Get common packet header.

Definition at line 603 of file headers.h.

◆ header() [2/2]

const PacketHeader& roc::rtcp::header::SenderReportPacket::header ( ) const
inline

Get common packet header.

Definition at line 598 of file headers.h.

◆ ntp_timestamp()

packet::ntp_timestamp_t roc::rtcp::header::SenderReportPacket::ntp_timestamp ( ) const
inline

Get NTP timestamp.

Definition at line 618 of file headers.h.

◆ num_blocks()

size_t roc::rtcp::header::SenderReportPacket::num_blocks ( ) const
inline

Get number of blocks.

Definition at line 658 of file headers.h.

◆ packet_count()

size_t roc::rtcp::header::SenderReportPacket::packet_count ( ) const
inline

Get packet count.

Definition at line 638 of file headers.h.

◆ reset()

void roc::rtcp::header::SenderReportPacket::reset ( )
inline

Reset to initial state (all zeros).

Definition at line 588 of file headers.h.

◆ rtp_timestamp()

uint32_t roc::rtcp::header::SenderReportPacket::rtp_timestamp ( ) const
inline

Get RTP timestamp.

Definition at line 628 of file headers.h.

◆ set_byte_count()

void roc::rtcp::header::SenderReportPacket::set_byte_count ( const size_t  cnt)
inline

Set byte count.

Definition at line 653 of file headers.h.

◆ set_ntp_timestamp()

void roc::rtcp::header::SenderReportPacket::set_ntp_timestamp ( const packet::ntp_timestamp_t  t)
inline

Set NTP timestamp.

Definition at line 623 of file headers.h.

◆ set_packet_count()

void roc::rtcp::header::SenderReportPacket::set_packet_count ( const size_t  cnt)
inline

Set packet count.

Definition at line 643 of file headers.h.

◆ set_rtp_timestamp()

void roc::rtcp::header::SenderReportPacket::set_rtp_timestamp ( const uint32_t &  t)
inline

Get RTP timestamp.

Definition at line 633 of file headers.h.

◆ set_ssrc()

void roc::rtcp::header::SenderReportPacket::set_ssrc ( const uint32_t  s)
inline

Set SSRC of sender.

Definition at line 613 of file headers.h.

◆ ssrc()

uint32_t roc::rtcp::header::SenderReportPacket::ssrc ( ) const
inline

Get SSRC of sender.

Definition at line 608 of file headers.h.


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