[Bug 765435] plugins: rework dmabuf import

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 23 15:46:35 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765435

--- Comment #6 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
(In reply to sreerenj from comment #5)
> 
> Hm I thought the correct solution could be like this (considering v4l2src
> and vaapipostproc as example)
> 
> -- vaapipostproc always provide dmabuf-capable bufferpool upstream if dmabuf
> capsfeatures get negotiated.

When v4l2src is io-mode=dmabuf, it pushes buffers with dmabuf memory:

if (gst_is_dmabuf_memory()) { .. }

Thus, downstream element (vaapipostproc, e.g.) can recognize those buffers and
"import" them, bypassing its sinkpad bufferpool, which is an improvement.
Neither, a capsfeature, is needed to negotiate. Simple and clean.

But (!) if v4l2src is io-mode=dmabuf-import, downstream element (vaapipostproc,
e.g.) needs to know it (for now, using the hackish function of
has_dmabuf_capable_peer()) and share a dmabuf capable bufferpool to upstream.
This case may need a capsfeature, but I would prefer the previous mechanism.

> -- v4l2src by deafult work in import mode (io-mode=dmabuf-import), which
> means it will try to use the pool supplied by downstream vaapipostproc.

I don't think v4l2src uses io-mode as dmabuf-import as default. Neither I see
it as the best dmabuf related io-mode. 

> -- in case if v4l2src failed to use the downstream supplied pool, it will
> jump to export mode (io-mode=export) and push buffers from it's on pool
> which will work fine with vaapipostproc.

The other problem is when VAAPI needs to push dmabuf buffers (bug 755072). This
case is becoming a needed use-case since transfering 4K buffers to glimagesink
is broken.

The simple solution would be that all raw caps negotiation should deliver
dmabuf memory based buffers, so glimagesink would "import" them without mem
copy. No caps negotiation, no complex buffer pool sharing to upstream.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list