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...
 
packet::stream_source_t ssrc () const
 Get SSRC of sender. More...
 
void set_ssrc (const packet::stream_source_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...
 
packet::stream_timestamp_t rtp_timestamp () const
 Get RTP timestamp. More...
 
void set_rtp_timestamp (const packet::stream_timestamp_t t)
 Get RTP timestamp. More...
 
uint32_t packet_count () const
 Get packet count. More...
 
void set_packet_count (const uint32_t cnt)
 Set packet count. More...
 
uint32_t byte_count () const
 Get byte count. More...
 
void set_byte_count (const uint32_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:647
nanoseconds_t timestamp(clock_t clock)
Get current timestamp in nanoseconds.

Definition at line 621 of file headers.h.

Member Function Documentation

◆ byte_count()

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

Get byte count.

Definition at line 697 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 718 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 712 of file headers.h.

◆ header() [1/2]

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

Get common packet header.

Definition at line 652 of file headers.h.

◆ header() [2/2]

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

Get common packet header.

Definition at line 647 of file headers.h.

◆ ntp_timestamp()

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

Get NTP timestamp.

Definition at line 667 of file headers.h.

◆ num_blocks()

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

Get number of blocks.

Definition at line 707 of file headers.h.

◆ packet_count()

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

Get packet count.

Definition at line 687 of file headers.h.

◆ reset()

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

Reset to initial state (all zeros).

Definition at line 637 of file headers.h.

◆ rtp_timestamp()

packet::stream_timestamp_t roc::rtcp::header::SenderReportPacket::rtp_timestamp ( ) const
inline

Get RTP timestamp.

Definition at line 677 of file headers.h.

◆ set_byte_count()

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

Set byte count.

Definition at line 702 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 672 of file headers.h.

◆ set_packet_count()

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

Set packet count.

Definition at line 692 of file headers.h.

◆ set_rtp_timestamp()

void roc::rtcp::header::SenderReportPacket::set_rtp_timestamp ( const packet::stream_timestamp_t  t)
inline

Get RTP timestamp.

Definition at line 682 of file headers.h.

◆ set_ssrc()

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

Set SSRC of sender.

Definition at line 662 of file headers.h.

◆ ssrc()

packet::stream_source_t roc::rtcp::header::SenderReportPacket::ssrc ( ) const
inline

Get SSRC of sender.

Definition at line 657 of file headers.h.


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