We don’t have plugin to do this.Here are some suggestion about how to do.
A GpuMat from an input GstBuffer
you can use EGLImage + cuGraphicsResourceGetMappedEglFrame to get GPU address.
DMA buf can be used by both CPU and GPU.
In the case of a non-in-place, non-passthrough plugin
Write a Mat to an output GstBuffer
Here you must use memory copy to GstBuffer.
Write a GpuMat to an output GstBuffer
Use method in comment 1 to get gstbuffer’s GPU address, then use cuda memory copy.
BTW, different plugin output different GSTbuffer(some with raw buffer, some output dmabuf(Memory:NVMM)), so you have to know what kind of buffer gst-plugin output.