Hey!
Currently in my GStreamer pipeline on my NX, I pass in NVMM memory from the appsrc by taking a dma_buffer
from a camera and then passing it onto gstreamer like this:
NvBufferParams par;
NvBufferGetParams(dmabuf_id, &par);
gpointer data_new = g_malloc(par.nv_buffer_size);
GstMemoryFlags flags = (GstMemoryFlags) 0;
buffer = gst_buffer_new_wrapped_full(flags,
data_new,
par.nv_buffer_size,
0,
par.nv_buffer_size,
user_data,
notify_to_destroy);
if (gst_buffer_map(buffer, &map, GST_MAP_WRITE))
{
memcpy(map.data, par.nv_buffer, par.nv_buffer_size);
gst_buffer_unmap(buffer, &map);
}
The thing is, I need this pipeline to also work on x86 but I noticed that I don’t have access to nvbuf_utils.h
, so I don’t have the ability to create NvBuffers from my existing image data and then pass it onto my pipeline. How do you pass NVMM memory to the pipeline if I don’t have access to the NvBuffer header files on x86?
What I’m really looking for is two examples:
- Creating NvBuffer’s from RAW GPU memory
- Creating NvBuffer’s from VPI images