Is it possible to modify the buffer to draw something on that ??
I have used Buffer Surface Management API to obtain the buffer and then cv::mat and I drew whatever I wanted to draw on it. Now I want to overwrite the original buffer with the modified one ??
*It should get modified in a way that the next elements in the pipeline should see the modified buffer.
Note :- I do not have streammux in the pipeline, so I can not use osd element.
If you do not want to use GPU to process and replace the video content, it is no meaning to get the video data from NvBufSurface. You can probe in the sink pad of the avenc_mjpeg, the video is just a normal GstBuffer, you can change the content directly.