ingest and (crate features rtsp or webrtc) only.Expand description
Shared RTP/RTCP parsing and NAL-codec (de)packetization — RFC 3550 framing plus H.264 (RFC 6184) and H.265 (RFC 7798) payload formats.
Gated behind the internal _rtp marker, pulled in by both rtsp and
webrtc. The two transports differ only in how RTP packets reach the
process (TCP-interleaved / UDP for RTSP, DTLS-SRTP for WebRTC); once a packet
is in hand, reassembling NAL units into an Annex-B access unit is identical,
so it lives here once.
§What it does
RtpHeader::parsedecodes the fixed RTP header (RFC 3550 §5.1), honoring the CSRC count and the extension-header flag to locate the payload.H264Depacketizer/H265Depacketizerturn a sequence of RTP payloads into complete access units in Annex-B form. Each handles the three NALU packetization modes for its codec — single NAL, aggregation (STAP-A type 24 / AP type 48), and fragmentation (FU-A type 28 / FU type 49) — emitting an access unit when the marker bit is set or the timestamp advances.RtpPacketizerperforms the reverse for egress (e.g. WebRTC WHEP), selecting the H.264 or H.265 payload format.
§What it does not do
Jitter-buffer reordering and loss concealment are the caller’s concern — the
depacketizer assumes in-order delivery (true for TCP-interleaved RTSP; for
UDP/SRTP a small reorder buffer should sit in front of it). It reports a
DepacketizeError::OutOfOrder gap so a handler can request a keyframe
(PLI/FIR) rather than emit a corrupt access unit.
Structs§
- AacDepacketizer
- Depacketizes RFC 3640 AAC-hbr RTP payloads into raw AAC access units.
- Access
Unit - A reassembled coded video frame from the RTP bus.
- Av1Depacketizer
codec-av1 - Reassembles AV1 RTP payloads into temporal units. Counterpart to
Av1Packetizer: it concatenates each packet’s OBU-element bytes (past the aggregation header) and, on the RTP marker, parses the length-delimited elements back into low-overhead OBUs (re-adding eachobu_has_size_field). - Av1Packetizer
codec-av1 - Packetizes an AV1 temporal unit into RTP using the AOMedia payload format.
- H264
Depacketizer - Reassembles RFC 6184 H.264 RTP payloads into Annex-B access units.
- H265
Depacketizer - Reassembles RFC 7798 H.265 (HEVC) RTP payloads into Annex-B access units.
- RtpHeader
- A parsed RTP fixed header (RFC 3550 §5.1).
- RtpPacketizer
- Packetizes H.264 Annex-B access units into RFC 6184 RTP packets — the inverse
of
H264Depacketizer, used for WebRTC/WHEP egress. - Vp9Depacketizer
- Reassembles VP9 RTP payloads (draft-ietf-payload-vp9, non-flexible single
layer) into coded frames. Counterpart to
Vp9Packetizer. - Vp9Packetizer
- Packetizes VP9 coded frames into RTP, using a flexible-mode-off payload descriptor for the common single-layer (non-scalable) case.
Enums§
- Depacketize
Error - Errors surfaced while depacketizing an RTP stream.