How to extract timestamp associated with every frame in video

Hi,
Please add below code and check if you can get valid pts:

static GstClockTime prevPts = 0;
g_print("PTS %lu diff %lu (in nano second) \n", buf->pts, buf->pts - prevPts);
prevPts= buf->pts;

We add it in tracking_done_buf_prob() in deepstream_app.c and can see valid values( diff 33ms in playing 30fps video )