How to save result using yolo plugin on TX2

Now I want to save the recognized video result using yolo plugin based on TX2 platform,do you have any suggestion for this ?

I have learned the test code ,it’s using g_object_set(G_OBJECT(sink), “location”, “out_test1.mp4”, NULL) to save result.

How to do using yolo plugin?

I have learned how to save the recognized result ,I’m also want to save the frames to images which include objects,do you know how to do it,which function I should to modify?