Allocators - 2020.2 English - XD336

Versal Base TRD Documentation (XD336)

Document ID
XD336
Release Date
2025-12-01
Version
2020.2 English

GStreamer abstracts buffer allocation and pooling. Custom allocators and buffer pools can be implemented to accommodate custom use-cases and constraints. The video source controls buffer allocation, but the sink can propose parameters in the negotiation phase.

The DMABUF framework is used to import and export buffers in a 0-copy fashion between pipeline elements, which is required for high-performance pipelines, as shown in the following figure. The v4l2src, kmssink, and vvas elements are all capable of allocating and exporting as well as importing DMABUFs to/from their peer elements.

DMABUF Sharing Mechanism

Fig. 8 DMABUF Sharing Mechanism

Note that DMABUFs are not necessarily physically contiguous depending on the underlying kernel device driver, that is, the UVC v4l2 driver does not allocate CMA memory which results in a data copy if its peer element can only handle contiguous memory.