Deepstream SDK pipeline flexibility

Hi Team,
Just wanted to know about how much flexible is the deepstream SDK? Like if i want to do 3D object detection or run yolo with tracking and use the tracking output as per the business requirement. How should i go about it ? Currently i am trying to low level apis for using tracker and reading video from opencv in C++ .Is it possible to just put my model in an existing deep stream pipeline i.e. replace the pgie of deepstream-test2(the one with tracking)? Do i have to write low level code in C for making such modifications ? Which path do you think would be easier ? using the pipeline or writing something low level level like this KLT tracker . My usecase pretty similar to this. I want to detect object using a custom model, track it and process the tracking result based on some rules(like trigger other stuff).