Print frame timestamp

Last modified by Michael Videlgauz on 2025/01/03 17:48

The timestamp for a specific buffer captured by the Frame Grabber is measured in nanoseconds (relative to the Frame Grabber's internal counter).

It is logged at the frame's start capture and remains valid until the buffer is refilled with a new frame.

KYFG_BufferGetInfo() function, with KY_STREAM_BUFFER_INFO_TIMESTAMP command can be used to get the timestamp value for the selected buffer, identified by its handle.

It is advised to retrieve the timestamp in the stream callback before returning the buffer back to the queue.

uint64_t timestamp = 0;
KYFG_BufferGetInfo(streamBufferHandle, KY_STREAM_BUFFER_INFO_TIMESTAMP, &timestamp , NULL, NULL);
KAYA Instruments © 2024. All Rights Reserved.