#[non_exhaustive]pub enum ReceiverItemRef<'rx> {
Video(VideoFrameRef<'rx>),
Audio(AudioFrameRef<'rx>),
Metadata(MetadataFrameRef<'rx>),
Event(ReceiverEvent),
}Expand description
An item delivered by Receiver::capture_any_ref. Media borrows native
storage and keeps the receiver borrowed until its matching guard is
dropped. Borrowed capture allocates and copies no payload; video row and
audio channel padding are never exposed as initialized slices.
These items implement Send + Sync under the same SDK contract as the
typed receiver references. They may move to scoped worker threads while
retaining their receiver borrow. Use Self::to_owned to keep an item
after releasing the receiver.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Video(VideoFrameRef<'rx>)
Validated uncompressed video, possibly with padded rows or planes.
Audio(AudioFrameRef<'rx>)
Validated planar audio, possibly with padded channels.
Metadata(MetadataFrameRef<'rx>)
Standalone frame metadata.
Event(ReceiverEvent)
A consumed, coalesced receiver invalidation; no native buffer.
Implementations§
Source§impl ReceiverItemRef<'_>
impl ReceiverItemRef<'_>
Sourcepub fn to_owned(&self) -> ReceiverItem
pub fn to_owned(&self) -> ReceiverItem
Copy media into an owned item using the typed capture copy paths. Video rows and audio channels become packed; timing and metadata are preserved. Video/audio allocate one payload buffer and metadata when present; metadata allocates its text; events simply copy their value. This makes no SDK call and retains no native frame or receiver borrow.