[Bug 728438] v4l2: Implement a v4l2 video encoder

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Mar 28 15:35:19 UTC 2017


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

--- Comment #68 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
It's more complicated then that. To import a buffer, you still need to request
buffers with the special type DMABUF. To v4l2src will "allocate" v4l2 buffer
with request type DMABUF. While v4l2enc should allocate with type MMAP. v4l2enc
will export those mmap buffer to DMABuf Fds if you have set the right mode.

So you have two buffer pools, what v4l2src will do, is allocate from the
downstream pool, and then import the FD into the v4l2src pool memory, keep a
reference on the downstream buffer and then Queue that buffer to be filled
(capture). When it comes out, we detach the FD from the v4l2src buffer, and
push the filled downstream buffer.

The allocation happens when the pools are activated. In you case, what fails is
the importation. It fails because the downstream encoder is not producing
exporting dmabuf. The encoder should support output-io-mode, and you should
have set that to "dmabuf". Another future note, this exportation/importation
should be negotiated, and should happen automatically. Final note, upstream
importation like this does only works if by chance the selected stride in your
source matches the selected encoder stride. We are missing code to setup the
source to use the downstream stride here.

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


More information about the gstreamer-bugs mailing list