How to display frame number on screen?

Hi,

I m trying to display the frame number for each source using “overlay_graphics (AppCtx * appCtx, GstBuffer * buf, NvDsBatchMeta * batch_meta, guint index)”, but i found out that it is always 0.
Actually many important fields in frame_meta object are empty, including frame_meta->pad_index, frame_meta->source_id.

Is there any way to fix this simple bug?
Thanks

Are U using deepstream-app, which DS version U used, these fileds should not be empty. Could you share more details.

I m using deepstream reference app in Deepstream 4.0.2 with latest Jetpack.

Could you explain how to find the fileds empty or how to repro your issue?

just go to “overlay_graphics (AppCtx * appCtx, GstBuffer * buf, NvDsBatchMeta * batch_meta, guint index)” in deepstream app source code, and print frame_meta->pad_index, frame_meta->source_id fields using provided batch_meta.

Instead of using overlay graphics function, you needs to install a probe on sinkpad of tiler component. Inside this function, you can acquire displaymeta and set frame number to be displayed - refer to deepstream-test1 app for details.