pub struct Frame<'a> {
pub width: u32,
pub height: u32,
pub pixel_format: PixelFormat,
pub timestamp_ns: u64,
pub frame_id: u64,
/* private fields */
}Expand description
Borrowed view of a single received frame.
The lifetime 'a is tied to the adapter-owned buffer that fed this
invocation; callers must not escape Frame past the end of their
callback.
Fields§
§width: u32Frame width in pixels.
height: u32Frame height in pixels.
pixel_format: PixelFormatDecoded pixel format.
timestamp_ns: u64Wall-clock timestamp captured by the adapter at frame arrival, expressed in nanoseconds since the Unix epoch.
This is intentionally NOT the GenICam Timestamp register on
VmbFrame_t, which is camera-clock-relative (counts from the
camera’s last power-on for most Allied Vision USB models) and
therefore unsuitable for wall-clock-aware downstream consumers.
frame_id: u64Monotonically increasing frame identifier assigned by the SDK.
Implementations§
Source§impl<'a> Frame<'a>
impl<'a> Frame<'a>
Sourcepub fn new(
data: &'a [u8],
width: u32,
height: u32,
pixel_format: PixelFormat,
timestamp_ns: u64,
frame_id: u64,
) -> Self
pub fn new( data: &'a [u8], width: u32, height: u32, pixel_format: PixelFormat, timestamp_ns: u64, frame_id: u64, ) -> Self
Build a borrowed frame view. Intended to be called by a
VmbRuntime adapter (either the real FFI adapter or an
in-memory fake) after it has decoded the SDK’s frame descriptor
into plain Rust types.