Part Number:TMS320DM8168
Hi all,
My problem only involves gstreamer skills, I hope that someone can write down some tips for me.
I'm writing code to run following pipeline: appsrc -> omx_h264enc -> rtph264pay -> udpsink
My code runs with FPS ~ 8 ms because there are some memcpy to copy data from GstBuffer into omx buffer.
I have 8 buffers for image data. Below is my code to push data from appsrc into encoder
GstBuffer *buffer = gst_buffer_new();
GST_BUFFER_MALLOCDATA(buffer) = frameBuffer[i];
GST_BUFFER_SIZE(buffer) = frameSize;
GST_BUFFER_DATA(buffer) = GST_BUFFER_MALLOCDATA(buffer);
GST_BUFFER_FREE_FUNC(buffer) = customFreeSharedMemory;
GstFlowReturn ret = gst_app_src_push_buffer(appsrc, buffer);
I'm trying to share data between appsrc and omx_h264enc (GstBuffer and omx buffer). OMX uses omxbufferalloc for passing buffer without memcpy into omx component.
omxbufferalloc allocates some OMX_BUFFERHEADERTYPE struct with malloc data from Shared region 2. I can't use omxbufferalloc because frame buffer must be allocated by my app.
In my code, I have to use element appsrc to push frame data into pipeline. I think, with default settings, omx_h264enc will create a new OMX_BUFFERHEADERTYPE struct with OMX_AllocateBuffer and memcpy GstBuffer data into. Therefore, I need to find the way to push GstBuffer which omx only needs to call OMX_UseBuffer with data from GstBuffer.
Could anybody help me for a second ?
Many thanks !