My gstreamer pipeline is:
gst-launch-1.0 v4l2src device="/dev/video1" ! "video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)RGBA" ! MyFilter ! nvoverlaysink -v
“MyFilter” is custom transform plugin which i buid for my own, but i don’t know how to get video frame from “nvvidconv”. Does anyone know how to get video frame from nvvidconv?
When i use “videoconvert”, i can get YUV data and correct size of one YUV frame. But with “nvvidconv”, size of data is very small (like size = 744). I want to get data in transform function like this:
static GstFlowReturn
gst_myfilter_transform (GstBaseTransform * base, GstBuffer * inbuf, GstBuffer * outbuf)
{
GstMapInfo in_info;
GstMapInfo out_info;
int nRow;
gst_buffer_map(inbuf, &in_info, GST_MAP_READ);
gst_buffer_map(outbuf, &out_info, GST_MAP_WRITE);
g_print ("in_info.size = %d\n", in_info.size);
gst_buffer_unmap(inbuf, &in_info);
gst_buffer_unmap(outbuf, &out_info);
return GST_FLOW_OK;
}