Expand description
RTP header-extension profile IDs from RFC 8285.
RTP packets carry an extension block only when the fixed-header X bit is
set. The 16-bit profile ID then decides whether extension elements use the
one-byte or two-byte element header shape.
RTP extension block
+----------------+----------------+-----------------------------+
| profile ID | length in u32 | extension elements |
+----------------+----------------+-----------------------------+
| 16 bits | 16 bits | padded to 32-bit boundary |
+----------------+----------------+-----------------------------+
One-byte element, profile 0xBEDE
+---------+---------+----------------------+
| ID | len-1 | data |
+---------+---------+----------------------+
| 4 bits | 4 bits | 1 to 16 bytes |
+---------+---------+----------------------+
Two-byte element, profile 0x1000 through 0x100F
+---------+---------+----------------------+
| ID | len | data |
+---------+---------+----------------------+
| 8 bits | 8 bits | 0 to 255 bytes |
+---------+---------+----------------------+Constantsยง
- HEADER_
BYTES ๐ - ONE_
BYTE_ DATA_ LEN_ MAX - ONE_
BYTE_ DATA_ LEN_ MIN - One-byte header extension data size bounds from RFC 8285 section 4.2.
- ONE_
BYTE_ ID_ MAX - ONE_
BYTE_ ID_ MIN - ONE_
BYTE_ ID_ PAD - One-byte header extension identifier values.
- ONE_
BYTE_ ID_ RESERVED - ONE_
BYTE_ ๐ID_ SHIFT - ONE_
BYTE_ ๐LENGTH_ MASK - ONE_
BYTE_ ๐LENGTH_ OFFSET - ONE_
BYTE_ PROFILE_ ID - RFC 8285 one-byte header extension profile ID.
- TWO_
BYTE_ DATA_ LEN_ MAX - TWO_
BYTE_ DATA_ LEN_ MIN - Two-byte header extension data size bounds from RFC 8285 section 4.3.
- TWO_
BYTE_ PROFILE_ ID_ BASE - Base value for the RFC 8285 two-byte header profile with appbits set to 0.
- TWO_
BYTE_ PROFILE_ PREFIX_ MASK - Mask for the fixed 12-bit prefix (
0x100) in the two-byte profile ID. - WORD_
BYTES ๐
Functionsยง
- find_
one_ byte_ element - Finds an RFC 8285 one-byte extension element in a complete muxed RTP packet.
- is_
one_ byte_ id - Returns whether
idis usable as an RFC 8285 one-byte element ID. - two_
byte_ profile_ id - Builds an RFC 8285 two-byte profile ID from the 4-bit appbits value.