opencv data buffer to gst data buffer

After the video stream data is received and processed by opencv, it is planned to call GST encoding and upload. How can opencv’s data buffer define which GST buffer can be used directly or which GST function can be called to process the data stream between the two.
Thank you all.

Hi,
Please check the sample in the link:
https://devtalk.nvidia.com/default/topic/1023635/jetson-tx2/failed-to-get-h265-file-using-opencv-gstreamer/post/5208302/#5208302