Hi guys
I want to push NVMM nvbufer(DMA) in to gstreamer appsrc pipeline? How To do it ? this is my sample code that doesn’t work ?
int dmabuf_fd;
NvBufferCreate(&dmabuf_fd, 1920, 1080, NvBufferLayout_Pitch, NvBufferColorFormat_YVU420);
NvBufferParamsEx params = { 0, };
if (NvBufferGetParamsEx (dmabuf_fd, ¶ms)) {
}
GstMemory *mem;
// /* make empty buffer */
buffer = gst_buffer_new();
GstAllocator * aloc = gst_dmabuf_allocator_new();
mem = gst_dmabuf_allocator_alloc(aloc, dmabuf_fd, params.params.psize[0]);
/* add the buffer */
gst_buffer_append_memory(buffer, mem);
gst_app_src_push_buffer(GST_APP_SRC (source) ,buffer);
Thanks