NMS on top of deepstream reference app

Currently, I am working with modified deepstream reference app and have made changes to gstdsexample plugin. Now, I want to perform NMS on the image buffers and bounding boxes and render only the final output on the screen. How to modify the boxes and buffers inplace ?

Did you read all code in “gst_dsexample_transform_ip()”? If you understand the code, you will know how to modify the bboxs and buffers inplace.