How to modify the incoming frame from custom plugins tranform_ip() function and pass modified to NVOSD

Hi,

I have created the GST pipeline like this: (Using Deepstreamer 4.0+)

filesrc -> h264parse ->nvv4l2decoder -> nvstreammux -> nvinfer -> nvtracker -> nvvidconv
-> dsexample -> nvosd

In dsexample plugin i want to access the incoming and want to perform some OpenCV operations on that and want to pass modified frame to NVOSD.

Question:

  1. How can i access the current frame in gst_dsexample_transform_ip?
  2. How can i convert current frame(surface) to cv::Mat ?
  3. How to pass this modified frame to OSD ?
  4. Can i get some source code for the same ?

(Note: I have gone through the dsexample plugins code but it does not clarify my doubts)

Please Help!!!

Hi,
There are sample codes. Please check 2, 5 in FAQ