Skip to main content

Module rtp

Module rtp 

Source
Expand description

Router-native RTP model for the transport edge.

This module defines the typed domain model used to describe media streams, codecs, and their negotiated properties. It sits between the signaling/SDP layer and the raw packet loop, allowing the router to reason about media without parsing raw bytes or string-heavy protocol bags.

§RTP Packet Context

Most of the types defined here map directly to fields in the “RFC 3550” RTP header or its extensions:

 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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • V: version (always 2)
  • P: padding bit
  • X: extension bit (if set, an extension header follows the SSRC)
  • CC: “CSRC count”, the number of contributing source identifiers (0-15) that follow the SSRC
  • M: “Marker” bit, used by profiles to mark significant events like the end of a video frame
  • PT: “Payload Type” (identifies the codec)
  • SSRC: unique stream identifier

RFC references for this module:

Structs§

HeaderExtension
RTP header-extension configuration (RFC 8285).
HeaderExtensionId
Local 4-bit identifier for a header extension (RFC 8285).
MediaCapabilities
Full set of codec and extension capabilities for an RTP endpoint.
MediaCodecCapability
Codec capability advertised by a router or endpoint.
MediaFormat
Negotiated codec format for a concrete media stream.
MediaStream
Description of one logical media stream (e.g. “camera”) at the router boundary.
Mid
Media identification (RFC 9143).
PayloadType
7-bit RTP payload type value usable in RTP/RTCP muxed sessions
Rid
Restriction identifier (RFC 8851).
RtcpFeedback
One negotiated RTCP feedback mechanism for a codec.
Ssrc
Synchronization source identifier for a media stream (RFC 3550).
StreamBinding
Routing bridge between a negotiated media format and a physical stream.

Enums§

CodecSetting
Typed codec parameter that affects interoperability.
RtcpFeedbackKind
Categories of feedback messages sent over RTCP to control stream behavior.

Functions§

codec_setting_from_wire 🔒

Type Aliases§

HeaderExtensionUri
Uniform resource identifier for a header extension (e.g. “urn:ietf:params:rtp-hdrext:ssrc-audio-level”)
MediaCodec
Canonical name for a media codec (e.g. “opus”, “vp8”, “h264”)