Expand description
VP8 RTP payload helpers.
These helpers operate on the codec payload slice, not on the full RTP packet. In runtime forwarding that slice starts after the RTP fixed header, CSRC list and any RTP header-extension block.
RFC 7741 puts a VP8 payload descriptor in front of the VP8 payload header. The descriptor is also where simulcast and temporal-layer packet identity is carried. o-sfu keeps the RFC constants here, while the runtime uses str0mโs descriptor parser and patch support for local egress.
VP8 payload slice passed to this module
+------------------+----------------------+----------------------+
| descriptor byte | extension bytes | VP8 payload header |
+------------------+----------------------+----------------------+
| X R N S PartID | I L T K fields | P bit and VP8 data |
+------------------+----------------------+----------------------+
Extension bytes when X=1
+-------------+-------------------+-------------+----------------+
| I L T K ... | PictureID if I=1 | TL0 if L=1 | T/K if present |
+-------------+-------------------+-------------+----------------+
| | 1 or 2 bytes | 1 byte | 1 byte |
+-------------+-------------------+-------------+----------------+Constantsยง
- DIMENSION_
MASK ๐ - INTERFRAME_
BIT - VP8 payload-header P bit set for interframes.
- I_BIT
PictureIDpresent bit in the extended VP8 payload descriptor.- KEYFRAME_
SYNC_ ๐CODE - K_BIT ๐
- LONG_
PICTURE_ ID_ BIT - Long
PictureIDmarker bit in the VP8PictureIDfield. - LONG_
PICTURE_ ID_ MASK - Value mask for the 15-bit VP8 long
PictureIDfield. - LONG_
PICTURE_ ID_ MODULUS - Modulus for the 15-bit VP8 long
PictureIDfield. - L_BIT
- TL0PICIDX present bit in the extended VP8 payload descriptor.
- MAX_
DEFINED_ ๐VERSION - PARTITION_
ID_ ๐MASK - SHORT_
PICTURE_ ID_ MASK - value mask for the 7-bit VP8 short
PictureIDfield - S_BIT
- Start of VP8 partition bit in the payload descriptor.
- TEMPORAL_
LAYER_ ID_ MASK - Value mask for the two-bit VP8 temporal-layer identity.
- T_BIT
- TID/Y/KEYIDX present bit in the extended VP8 payload descriptor.
- VERSION_
MASK ๐ - VERSION_
SHIFT ๐ - X_BIT
- Extended control bits are present in the VP8 payload descriptor.
Functionsยง
- extended_
frame_ ๐payload - Locates the VP8 frame bytes after an extended descriptor.
- payload_
starts_ keyframe - Detects a complete VP8 keyframe prefix in the first RTP packet.
- valid_
keyframe_ ๐prefix