pub struct KeyEpochSerializer;Expand description
Reference ExtensionSerializer for the SFrame key-epoch (KID) RTP header
extension.
§Wire format
A fixed 4-byte, big-endian 32-bit KID, matching RFC 9605 §6.1 (the v1
KID width) and the sframe-ratchet browser client. This is the
interoperable default; if your clients encode the KID differently, implement
your own serializer that parses into / writes from a KeyEpoch user value
— the fanout path keys on the KeyEpoch type, not these bytes.
KeyEpoch holds a u64 for generality, but the RFC v1 KID is 32-bit: a
value exceeding u32::MAX cannot be represented in the 4-byte form and is
not written (str0m then omits the extension), rather than silently
truncated. Supply your own serializer for wider KIDs.
The serializer applies to both audio and video media (SFrame protects
either). Its 4-byte value never requires the two-byte extension form
(str0m may still pick that form globally if another registered extension
needs it — a full u8 length encodes 4 bytes fine).
Trait Implementations§
Source§impl Clone for KeyEpochSerializer
impl Clone for KeyEpochSerializer
Source§fn clone(&self) -> KeyEpochSerializer
fn clone(&self) -> KeyEpochSerializer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KeyEpochSerializer
Source§impl Debug for KeyEpochSerializer
impl Debug for KeyEpochSerializer
Source§impl Default for KeyEpochSerializer
impl Default for KeyEpochSerializer
Source§fn default() -> KeyEpochSerializer
fn default() -> KeyEpochSerializer
Source§impl ExtensionSerializer for KeyEpochSerializer
impl ExtensionSerializer for KeyEpochSerializer
Source§fn write_to(&self, buf: &mut [u8], ev: &ExtensionValues) -> usize
fn write_to(&self, buf: &mut [u8], ev: &ExtensionValues) -> usize
Source§fn parse_value(&self, buf: &[u8], ev: &mut ExtensionValues) -> bool
fn parse_value(&self, buf: &[u8], ev: &mut ExtensionValues) -> bool
ExtensionValues::user_values field.