Home > other >  How to implement the data transmission between Gstreamer gstbuffer with opencv Mat?
How to implement the data transmission between Gstreamer gstbuffer with opencv Mat?

Time:03-19

How to implement the data transmission between Gstreamer gstbuffer with opencv Mat?

CodePudding user response:

Is the key to get to (gst_element_get_xxx_pad ()) elements of the source or sink pads, and increase the probe on the pads (probe) (gst_pad_add_probe), access to the data buffer in the callback function, and through the gst_buffer_map () will buffer fill GstMapInfo, here will GstMapInfo data member variables into Mat frame (Size (1920108), CV_8UC3, (char *) map. Data, Mat: : AUTO_STEP); Note that keep the buffer match the frame structure and Mat
  • Related