SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
SmolRTSP_RtcpSr Struct Reference

An RTCP Sender Report (SR) header. More...

#include <rtcp.h>

Data Fields

bool padding
 (1 bit) Padding flag.
 
uint8_t rc
 (5 bits) Reception report count.
 
uint32_t ssrc
 (32 bits) Synchronization source identifier of the sender.
 
uint32_t ntp_sec
 (32 bits) NTP-epoch seconds.
 
uint32_t ntp_frac
 (32 bits) NTP fractional seconds.
 
uint32_t rtp_ts
 (32 bits) The RTP timestamp that corresponds to the same instant as the NTP timestamp above.
 
uint32_t pkt_count
 (32 bits) Total number of RTP data packets transmitted by the sender since starting transmission, up to the time this SR was generated.
 
uint32_t octet_count
 (32 bits) Total number of payload octets (i.e., not including header or padding) transmitted by the sender since starting transmission.
 

Detailed Description

An RTCP Sender Report (SR) header.

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P| RC | PT=SR=200 | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC of sender | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | NTP timestamp, most significant word | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTP timestamp, least significant word | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RTP timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | sender's packet count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | sender's octet count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

All multi-byte numerical fields must be in network byte order, with the exception of ssrc which is treated as opaque (sender and receiver compare it as a bit pattern, so either endianness is acceptable provided it stays consistent with the matching RTP stream).

Reception report blocks (RC > 0) and chained SDES/BYE packets are not yet supported by this serializer; rc must be zero.

Field Documentation

◆ ntp_frac

uint32_t SmolRTSP_RtcpSr::ntp_frac

(32 bits) NTP fractional seconds.

2^32 represents one full second. Network byte order.

◆ ntp_sec

uint32_t SmolRTSP_RtcpSr::ntp_sec

(32 bits) NTP-epoch seconds.

NTP epoch is 1900-01-01 UTC; converting a Unix-epoch value requires adding 2208988800. Network byte order.

◆ octet_count

uint32_t SmolRTSP_RtcpSr::octet_count

(32 bits) Total number of payload octets (i.e., not including header or padding) transmitted by the sender since starting transmission.

Network byte order.

◆ padding

bool SmolRTSP_RtcpSr::padding

(1 bit) Padding flag.

When set, the SR ends with extra padding octets whose count is given in the last byte. Typically false.

◆ pkt_count

uint32_t SmolRTSP_RtcpSr::pkt_count

(32 bits) Total number of RTP data packets transmitted by the sender since starting transmission, up to the time this SR was generated.

Network byte order.

◆ rc

uint8_t SmolRTSP_RtcpSr::rc

(5 bits) Reception report count.

Must be 0 for this implementation.

◆ rtp_ts

uint32_t SmolRTSP_RtcpSr::rtp_ts

(32 bits) The RTP timestamp that corresponds to the same instant as the NTP timestamp above.

Receivers use this pair to map any RTP timestamp to wall-clock time. Network byte order.

◆ ssrc

uint32_t SmolRTSP_RtcpSr::ssrc

(32 bits) Synchronization source identifier of the sender.

Must match the SSRC of the corresponding RTP stream. Treated as opaque on the wire.


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