pub const VIDEO_FRAME: &str = "type VideoFrame { image: ImageFrame; timestamp_ns: u64; }";Expand description
A decoded image associated with a presentation timestamp.
Nanoseconds are exact u64 values, independent of wall-clock time. Place frames in a VideoClip to validate timestamp order and consistent image layout. A frame can be exchanged without starting a player or camera.
§Declaration
type VideoFrame { image: ImageFrame; timestamp_ns: u64; }§Fields and methods
-
image: A validated decoded image. -
timestamp_ns: Presentation timestamp in nanoseconds; no wall-clock origin is implied.
§Construct VideoFrame
Inspect the typed payload and metadata.
let frame = VideoFrame { image: ImageFrame { pixels: tensor[u8]([255], [1, 1, 1])? }, timestamp_ns: 16666667 };
print(frame.timestamp_ns);