Deepstream-app nvdsosd add callback probe for customized overlay

• Hardware Platform (Jetson / GPU): AGX Xavier
• DeepStream Version: 5.1
• JetPack Version (valid for Jetson only): 4.5
• TensorRT Version: 7.1.3

I am trying to build a customized OSD with running in deepstream-app.
I notice in deepstream-test2.c that I can define a probe type function calledosd_sink_pad_buffer_probe into the sink pad of NVOSD plugin, which I can customize the overlay of my application.

May I ask how I can achieve this kind of customized overlay in deepstream-app instead? I tried to look into the nvdsosd.c source and add such a probe function into OSD plugin, but I am not sure how I can achieve it and whether it’s correct. There isn’t much online reference about it.

I appreciate your advice!

Please refer to gie_processing_done_buf_prob, it add probe on osd sink pad in case osd in configuration enabled.
You can customize the overlay here.