Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
Compy_RtpHeader Struct Reference

An RTP header. More...

#include <rtp.h>

Data Fields

uint8_t version
 (2 bits) Indicates the version of the protocol.
 
bool padding
 (1 bit) Used to indicate if there are extra padding bytes at the end of the RTP packet.
 
bool extension
 (1 bit) Indicates presence of an extension header between the header and payload data.
 
uint8_t csrc_count
 (4 bits) Contains the number of CSRC identifiers (defined below) that follow the SSRC (also defined below).
 
bool marker
 (1 bit) Signaling used at the application level in a profile-specific manner.
 
uint8_t payload_ty
 (7 bits) Indicates the format of the payload and thus determines its interpretation by the application.
 
uint16_t sequence_number
 (16 bits) The sequence number is incremented for each RTP data packet sent and is to be used by the receiver to detect packet loss[1] and to accommodate out-of-order delivery.
 
uint32_t timestamp
 Used by the receiver to play back the received samples at appropriate time and interval.
 
uint32_t ssrc
 (32 bits) Synchronization source identifier uniquely identifies the source of a stream.
 
uint32_t * csrc
 (32 bits each, the number of entries is indicated by the CSRC count field) Contributing source IDs enumerate contributing sources to a stream which has been generated from multiple sources.
 
uint16_t extension_profile
 (optional, presence indicated by Extension field) The first 32-bit word contains a profile-specific identifier (16 bits) and a length specifier (16 bits) that indicates the length of the extension in 32-bit units, excluding the 32 bits of the extension header.
 
uint16_t extension_payload_len
 Length of the extension in 32-bit units (host byte order).
 
uint8_t * extension_payload
 The pointer to extension header data.
 

Detailed Description

An RTP header.

Multi-byte fields (sequence_number, timestamp, ssrc, extension_profile) are converted to network byte order by the serializer. Exception: extension_payload_len is in host byte order (number of 32-bit words) and converted to network byte order during serialization.

Field Documentation

◆ extension

bool Compy_RtpHeader::extension

(1 bit) Indicates presence of an extension header between the header and payload data.

The extension header is application or profile specific.

◆ extension_payload_len

uint16_t Compy_RtpHeader::extension_payload_len

Length of the extension in 32-bit units (host byte order).

The serializer converts to network byte order on the wire.

◆ extension_profile

uint16_t Compy_RtpHeader::extension_profile

(optional, presence indicated by Extension field) The first 32-bit word contains a profile-specific identifier (16 bits) and a length specifier (16 bits) that indicates the length of the extension in 32-bit units, excluding the 32 bits of the extension header.

The extension header data follows.

◆ marker

bool Compy_RtpHeader::marker

(1 bit) Signaling used at the application level in a profile-specific manner.

If it is set, it means that the current data has some special relevance for the application.

◆ padding

bool Compy_RtpHeader::padding

(1 bit) Used to indicate if there are extra padding bytes at the end of the RTP packet.

Padding may be used to fill up a block of certain size, for example as required by an encryption algorithm. The last byte of the padding contains the number of padding bytes that were added (including itself).

◆ payload_ty

uint8_t Compy_RtpHeader::payload_ty

(7 bits) Indicates the format of the payload and thus determines its interpretation by the application.

Values are profile specific and may be dynamically assigned.

◆ sequence_number

uint16_t Compy_RtpHeader::sequence_number

(16 bits) The sequence number is incremented for each RTP data packet sent and is to be used by the receiver to detect packet loss[1] and to accommodate out-of-order delivery.

The initial value of the sequence number should be randomized to make known-plaintext attacks on Secure Real-time Transport Protocol more difficult.

◆ ssrc

uint32_t Compy_RtpHeader::ssrc

(32 bits) Synchronization source identifier uniquely identifies the source of a stream.

The synchronization sources within the same RTP session will be unique.

◆ timestamp

uint32_t Compy_RtpHeader::timestamp

Used by the receiver to play back the received samples at appropriate time and interval.

When several media streams are present, the timestamps may be independent in each stream.[b] The granularity of the timing is application specific. For example, an audio application that samples data once every 125 μs (8 kHz, a common sample rate in digital telephony) would use that value as its clock resolution. Video streams typically use a 90 kHz clock. The clock granularity is one of the details that is specified in the RTP profile for an application.

◆ version

uint8_t Compy_RtpHeader::version

(2 bits) Indicates the version of the protocol.

Current version is 2.


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