How to draw dynamic lines with Deepstream?

I use a Jetson Nano circuit board and I would need your help to draw dynamic lines through Deepstream for example, through this example already available after having installed Deepstream :

This example than can be run by deepstream-app -c source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt when you are in the folder of the file, shows the detection of cars and pedestrians with rectangle boxes.

I would like to display other shapes instead of rectangles and lines as a function of coordinates given by another script. Could you explain to me which files I should modify so as to draw those shapes overlaying the video ?

Thanks in advance for your reply.