Expand description
Byte-exact object framing for MoQT data streams.
ObjectFramer turns the raw bytes of one unidirectional data stream
into individually addressable objects without altering them: every item
it yields is a slice of the bytes that were fed in, and concatenating
those items reproduces the stream exactly.
Framing is opt-in because it costs latency and memory โ an object is
only emitted once it is buffered whole. The proxy pays that cost only
when something is observing; see session::pipe_data.
Re-exportsยง
use std::collections::HashMap;๐use std::sync::Arc;๐use std::sync::Mutex;๐use bytes::Buf;๐use bytes::Bytes;๐use bytes::BytesMut;๐use moqtap_codec::dispatch::reemit_subgroup_object;๐use moqtap_codec::dispatch::AnyFetchFrame;๐use moqtap_codec::dispatch::AnyFetchGroupOrder;๐use moqtap_codec::dispatch::AnyFetchHeader;๐use moqtap_codec::dispatch::AnyFetchObjectMeta;๐use moqtap_codec::dispatch::AnyFetchObjectReader;๐use moqtap_codec::dispatch::AnyFetchObjectWriter;๐use moqtap_codec::dispatch::AnySubgroupHeader;๐use moqtap_codec::dispatch::AnySubgroupObjectMeta;๐use moqtap_codec::dispatch::AnySubgroupObjectReader;๐use moqtap_codec::dispatch::FetchReemit;๐use moqtap_codec::version::DraftVersion;๐use crate::capability::fetch_group_order_is_needed;๐use crate::event::DataStreamHeaderKind;๐use crate::instrument::Recorder;๐use crate::parser::data::is_incomplete_error;๐use crate::types::DataStreamType;๐pub use crate::types::BypassReason;pub use crate::types::ObjectMeta;
Structsยง
- Elide
Cursor - The state an elide leaves behind on a subgroup stream.
- Fetch
Group Orders - Every fetch this session has learned a Group Order for, keyed by the Request ID that names it on both the control plane and the data stream.
- Framer
Config - Configuration for
ObjectFramer. - Object
Framer - Frames a unidirectional MoQT data stream into individually addressable objects while preserving the exact wire bytes.
- Padded
Buf ๐ - A slice followed by a run of zero bytes.
- Pending
Object ๐ - The object the framer emitted most recently, whose forward-or-elide disposition has not been committed to the cursor yet.
- Subgroup
Context ๐ - Identity fields the stream header contributes to every object on a subgroup stream.
Enumsยง
- Framer
Out - One item produced by
ObjectFramer::poll. - Meta ๐
- The codec-level framing of one object, either stream kind.
- Probe ๐
- A reader clone whose decode succeeded and is ready to be adopted.
- Stage ๐
- What the framer is currently decoding.
Constantsยง
- UNBOUNDED_
MEASURING_ ๐PAD - Padding width that puts every wire length a varint can express within measuring reach.
- ZEROS ๐
- Backing bytes for
PaddedBufโs padded region.
Functionsยง
- subgroup_
context ๐ - The identity fields a subgroup header contributes to its objects.