[Bug 728438] v4l2: Implement a v4l2 video encoder

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


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

--- Comment #67 from Todor Tomov <todor.tomov at linaro.org> ---
Hi,

I continue to use the video encoder plugin on DB410c. I'm trying to use dmabuf
- to allocate buffers for video encoder sink, then export them and import on
v4l2src (camera). The pipeline is:

v4l2src device=/dev/video3 io-mode=dmabuf-import !
video/x-raw,format=NV12,width=1280,height=960,framerate=30/1 !
v4l2video4h264enc output-io-mode=dmabuf
extra-controls="controls,h264_profile=4,video_bitrate=200000;" ! h264parse !
mp4mux ! filesink location=/home/linaro/enc.h264.24.mp4

The full log is on: https://hastebin.com/birigavera.rb
(there are also some additional prints there)

It fails with errors:
gstv4l2allocator.c:1131:gst_v4l2_allocator_import_dmabuf:<v4l2src0:pool:src:allocator>
Memory 0 is not of DMABUF
gstv4l2bufferpool.c:366:gst_v4l2_buffer_pool_import_dmabuf:<v4l2src0:pool:src>
failed to import dmabuf

Investigating this I have reached the point to understand that there are no
buffers requested (via v4l2) from the video encoder at the moment when import
on v4l2src is done. Further, I can see that there are two buffer pools created:
v4l2video4h264enc0:pool:sink and videobufferpool0. When v4l2src enters in
"decide allocation", it receives videobufferpool0 as other_pool and allocates
the buffers from it. It seems to me that this is wrong and instead it should
receive v4l2video4h264enc0:pool:sink and allocate the buffers from it, which
will actually request buffers from the video encoder driver.
Is this correct?
Any idea why this happens?

Thank you,
Todor

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


More information about the gstreamer-bugs mailing list