Skip to main content

Module rtp

Module rtp 

Source
Expand description

RTP (Real-time Transport Protocol) implementation.

This module provides packet construction, parsing, and RTCP support according to RFC 3550.

§RTP Packet Structure

 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|X|  CC   |M|     PT      |       sequence number         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           timestamp                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           synchronization source (SSRC) identifier            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Structs§

RtcpPacket
A parsed RTCP packet.
RtpCounters
Thread-safe counters for tracking RTP statistics.
RtpHeader
RTP packet header (RFC 3550).
RtpPacket
A complete RTP packet (header + payload).
RtpStats
RTP/RTCP statistics snapshot.

Functions§

build_rtcp_bye
Build an RTCP BYE packet.
build_rtcp_rr
Build an RTCP Receiver Report (RR) packet.
build_rtcp_sr
Build an RTCP Sender Report (SR) packet.
parse_payload_type
Parse just the payload type from an RTP packet.
parse_rtp
Parse an RTP packet header and return the payload type and payload data.
parse_sequence
Parse the sequence number from an RTP packet.
parse_ssrc
Parse the SSRC from an RTP packet.
parse_timestamp
Parse the timestamp from an RTP packet.