pub struct Frame {
pub domain: MemoryDomain,
pub timing: FrameTiming,
pub sequence: u64,
pub meta: FrameMetaSet,
}Fields§
§domain: MemoryDomain§timing: FrameTiming§sequence: u64§meta: FrameMetaSetPer-frame metadata side-channel: typed blobs that travel with the buffer
(the GstMeta / GstAnalyticsRelationMeta analog). Empty on construction. A
zero-sized unit when the metadata feature is off, so the no_std / RTOS
baseline pays nothing; with the feature on it is a typed
FrameMetaSet carrying e.g.
AnalyticsMeta detections. See crate::meta.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(domain: MemoryDomain, timing: FrameTiming, sequence: u64) -> Self
pub fn new(domain: MemoryDomain, timing: FrameTiming, sequence: u64) -> Self
Construct a frame with an empty metadata set. Prefer this over the bare
struct literal at new construction sites so a future Frame field
addition does not break them.
Duplicate this frame for fan-out (a tee branch, or a multicast route).
The buffer is shared where the memory domain allows it: GPU handles and
pre-shared System bytes are refcounted (cheap), owned System bytes are
deep-copied (the honest cost of handing CPU bytes to a second consumer).
Per-frame metadata is shared by Arc refcount, with copy-on-write on the
branch that mutates it, so the copies never alias. Frame is deliberately
not Clone (owned CPU bytes make a silent clone a surprise cost); this is
the explicit, named fan-out primitive instead. See
MemoryDomain::share.
Fan-out is a heap operation (the domain share refcounts or deep-copies),
so it is gated behind alloc; the heap-free MCU path is a single linear
chain with no tee.