Import Intel dmabuf into pipeline

Nicolas Dufresne nicolas at
Mon Dec 13 14:09:36 UTC 2021

Le lundi 13 décembre 2021 à 12:03 +0100, Regina König via gstreamer-devel a
écrit :
> Hi everybody,
> I want to import an Intel is shared via a filedescriptor and 
> I am wondering if is the only possible way to import it with 
> gst_egl_image_from_dma_buf_direct(). I don't want to create an image 
> (this is an uneccessary step) but directly encode it with H264. I also 
> tried to import it with "fdsrc" but it seems to be only suitable for 
> concole, not for dmabuf's. What is the most efficient way to get access 
> to a dmabuf to directly encode it?

Just wrap your DMABuf FD using GstDMABufAllocator, place the GstMemory into a
GstBuffer, add GstVideoMeta to signal the padding and offsets and push that
buffer toward the VAAPI encoder. Note that until we have proper drm modifier
support, there will still be few oops on complex HW setup, but will work with
integrated graphics. Oh, and note that VA-API (the API) is strictly limited to 1
DMABuf per image.

> Thanks in advance,
> Regina König

More information about the gstreamer-devel mailing list