Writing a plugin that outputs to NV12
arta
adrian.szatmari at protonmail.com
Wed Sep 11 11:11:24 UTC 2019
Hi all!
I am trying to write a source plugin that outputs NV12 frames. I was able to
write the same plugin with RGBA version. In partcular, in my src_create
function, I have something like this:
GstSpinnakerSrc *src = GST_SPINNAKER_SRC(psrc);
GstMapInfo minfo;
spinNodeHandle hNode = NULL;
const size_t memoryAllocationSize = src->m_Height * src->m_BufferStride;
*buf = gst_buffer_new_and_alloc(src->m_Height * src->m_BufferStride);
gst_buffer_map(*buf, &minfo, GST_MAP_WRITE);
//HERE THE RGBA FRAME IS CREATED
spinnaker_frame(src, &minfo, 0);
gst_buffer_unmap(*buf, &minfo);
return GST_FLOW_OK;
Now I am wondering how to do something similar for NV12. The issue is that
RGBA frame is just a char* pointer, whereas NV12 seems to come as a char*
pSrc[3]. I am not sure how to deal with the three channels and the Gstreamer
buffer object. Is there an example somewhere, or maybe someone that knows
how to do this?
Thanks!
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list