Print frame timestamp

Last modified by Lev Andronov on 2025/05/27 13:12

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.

Vision Point API

KYFG_BufferGetInfo() function using KY_STREAM_BUFFER_INFO_TIMESTAMP command 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);

Vision Point II API

KYVPLibTL_DSGetBufferInfo_V1() function using KYVP_BUFFER_INFO_CMD_TIMESTAMP command to get the timestamp value for the selected buffer, identified by its handle.

uint64_t timestamp = 0;
KYVPLibTL_DSGetBufferInfo_V1(hDSHandle, hBufferHandle, KYVP_BUFFER_INFO_CMD_TIMESTAMP, &timestamp, NULL, NULL);
KAYA Instruments © 2024. All Rights Reserved.