pub struct Frame {
pub payload: Bytes,
pub width: u32,
pub height: u32,
pub pixel_format: PixelFormat,
pub chunks: Option<ChunkMap>,
pub ts_dev: Option<u64>,
pub ts_host: Option<SystemTime>,
}Expand description
Image frame produced by the GigE Vision stream reassembler.
Fields§
§payload: BytesContiguous image payload containing pixel data.
width: u32Width of the image in pixels.
height: u32Height of the image in pixels.
pixel_format: PixelFormatPixel format describing how to interpret the payload bytes.
chunks: Option<ChunkMap>Optional map of chunk values decoded from the GVSP trailer.
ts_dev: Option<u64>Device timestamp reported by the camera when available.
ts_host: Option<SystemTime>Host timestamp obtained by mapping the device ticks.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn chunk(&self, kind: ChunkKind) -> Option<&ChunkValue>
pub fn chunk(&self, kind: ChunkKind) -> Option<&ChunkValue>
Retrieve a chunk value by kind if it exists.
Sourcepub fn host_time(&self) -> Option<SystemTime>
pub fn host_time(&self) -> Option<SystemTime>
Host-reconstructed timestamp if the camera reports a device timestamp.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more