Hi, Please check
There is osd_sink_pad_buffer_probe() in the sample. You can apply the same to source pad of nvdsosd.