Which timestamp is correct?

Hi everyone,

I work on argus/sample/yuvJpeg.
What is difference between iFrame->getTime() and iMetadata->getSensorTimestamp()?

Code block;

    // Use the IFrame interface to print out the frame number/timestamp, and
    // to provide access to the Image in the Frame.
    IFrame *iFrame = interface_cast<IFrame>(frame);
    if (!iFrame)
        ORIGINATE_ERROR("Failed to get IFrame interface.");
    CONSUMER_PRINT("Acquired Frame: %llu, time %llu\n",
                   static_cast<unsigned long long>(iFrame->getNumber()),
                   static_cast<unsigned long long>(iFrame->getTime()));

    // Print out some capture metadata from the frame.
    IArgusCaptureMetadata *iArgusCaptureMetadata = interface_cast<IArgusCaptureMetadata>(frame);
    if (!iArgusCaptureMetadata)
        ORIGINATE_ERROR("Failed to get IArgusCaptureMetadata interface.");
    CaptureMetadata *metadata = iArgusCaptureMetadata->getMetadata();
    ICaptureMetadata *iMetadata = interface_cast<ICaptureMetadata>(metadata);
    if (!iMetadata)
        ORIGINATE_ERROR("Failed to get ICaptureMetadata interface.");
    CONSUMER_PRINT("\tSensor Timestamp: %llu, LUX: %f\n",
                   static_cast<unsigned long long>(iMetadata->getSensorTimestamp()),
                   iMetadata->getSceneLux());

hello povog33602,

may I know which JetPack release you’re working with.
you may also check release tag for confirmation. for example, $ cat /etc/nv_tegra_release

below capture the start-of-frame timestamp of the sensor signaling,
Argus::ICaptureMetadata::getSensorTimestamp

while EGL stream capture the timestamp when it rendering the frame to display. it’s close to end-of-frame of the sensor signaling,
EGLStream::IFrame::getTime

BTW,
please also refer to below forum discussion threads for checking capture timestamp.
for exmaple,
Topic 1058122, for the formula of Argus Timestamp Domain,
Topic 1065675, to demonstrate how to check the VI/RTCPU timestamp.
thanks

hello povog33602,

you should also check this similar discussion thread,
thanks