Writing a custom Gstreamer plugin

What’s “standing out” is that the wrapping takes that long

And that wouldn’t really depend on the PVA Clock freq, right? Although I’m running it on full speed.

/Fredrik

Hi,
Please try to wrap vpi images and reuse them. The NvBuffers are created and reused in capturing frames. You can also reuse the wrapped vpi images.

Hi DaneLLL,

Due to that I’m using the nvarguscamerasrc and there is no single buffer to reuse. On the capturing side I managed to reuse, but not on the “sink side”.

Why does the wrapping take that long?

Hi,
For clearness, please add the print before NvBufferTransform():

g_print("consumerFrameInfo->fd = %d, dmabuf_fd %d \n", consumerFrameInfo->fd, nv_mem->nvcam_buf->dmabuf_fd);

And you will see prints like:

consumerFrameInfo->fd = 1040, dmabuf_fd 1027
consumerFrameInfo->fd = 1040, dmabuf_fd 1028
consumerFrameInfo->fd = 1040, dmabuf_fd 1029
consumerFrameInfo->fd = 1040, dmabuf_fd 1030
consumerFrameInfo->fd = 1040, dmabuf_fd 1031
consumerFrameInfo->fd = 1040, dmabuf_fd 1032

So there are 1 + 6 buffers. We can wrap the 7 buffers to 7 vpi images and reuse these. It is not required to wrap and destroy it in every buffer processing.
Please try this approach.