Skip to main content

Module frame_header

Module frame_header 

Source
Expand description

Binary image envelope on the Zenoh image key.

Version 3 keeps the version-2 geometry offsets, then carries a bounded JSON metadata object in the same packet as its pixels. The fixed prefix is 24 bytes, all integers little endian:

OffsetSizeField
02magic 0x4746
21version 3
31pixel format code
44width
84height
124sequence counter
164row stride, or 0 for continuous packing
204metadata JSON byte length, at most 64 KiB

Metadata bytes follow, then the image pixels. Length 0 means no metadata.

Structs§

FrameHeader
Geometry and optional metadata for the pixels that follow it.

Enums§

FrameHeaderError
A malformed or unrepresentable image envelope.

Constants§

FRAME_MAGIC
Little-endian image magic, bytes [0x46, 0x47].
HEADER_SIZE
Fixed prefix size, excluding the optional metadata object and pixels.
SUPPORTED_VERSION
The only supported image envelope version.

Functions§

pixel_format_to_u8
The one-byte code the frame header carries format as; 0 for a format without one.
u8_to_pixel_format
The format a frame header’s one-byte code names; PixelFormat::Unknown(0) for 0 and for a code this table does not know.