Use jp4.6, xavier, how to get sensor timestamp with Argus?

Hi ,

I use argus sample “/usr/src/jetson_multimedia_api/samples/12_camera_v4l2_cuda”, want to add some code to get the sensor timestamp with argus, but I don’t know how to add , I added some code, but it compiled incorrectly.

my code:

and compiled error:

Thanks!
BR,

Hi,
Please add this print:

printf("timestamp %ld %ld \n", v4l2_buf.timestamp.tv_sec, v4l2_buf.timestamp.tv_usec);

after the frame is captured:

if (ioctl(ctx->cam_fd, VIDIOC_DQBUF, &v4l2_buf) < 0)
    ERROR_RETURN("Failed to dequeue camera buff: %s (%d)",
            strerror(errno), errno);

You should see timestamp being printed.

Hi DaneLLL,

Thanks very much for your reply!
Sorry for the late reply!

I want to make sure that if I add a print timestamp to the function “vi5_capture_dequeue”, can this timestamp be considered to be the timestamp to the video node(T3)?

Thanks!
BR,

Hi DaneLLL,

The above code “if (ioctl(ctx->cam_fd, VIDIOC_DQBUF, &v4l2_buf) < 0)” is in which function in which file, I can’t find it.

Thanks!
BR,