GNOME Bugzilla – Bug 783361
v4l2h264enc: Sink buffer pool activation fails
Last modified: 2017-06-05 14:59:13 UTC
Created attachment 353093 [details] gstreamer output log Hello, I'm playing with the new video encoder plugin: v4l2h264enc. I'm using DB410c with OV5645 camera and trying to capture a video and encode it. I'm running Debian Linaro release 17.04. I've got the patches from https://bugzilla.gnome.org/show_bug.cgi?id=728438 and tried them on both 1.12.0 and 1.10.4 (on 1.10.4 I had to also apply "pad: Add API to get the current state of a task" patch). With both versions I get the same error from video encoder sink pad: gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Failed to allocate required memory. gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Buffer pool activation failed I'm attaching output log (gst pipeline is also there) and v4l2 log.
Created attachment 353094 [details] v4l2 log
Created attachment 353096 [details] [review] v4l2videoenc: Make sure min_buffers is valid makes the buffer pool set config return FALSE in a context we didn't expect the config to be modified. Notes, it's still not fully idea, long term we should externalize the allocator, so that we can check if it supports CREATE_BUFS and set the max_buffer to 32 here. v4l2videoenc: Make sure min_buffers is valid When upstream does no use the v4l2videoenc pool, we need to activate that internal pool. Though, we relied the driver to provide a minimum required buffer, which Qualcomm Venus driver don't currently provide.
Hi Nicolas, Thank you for the quick response. Yes, this patch solves the problem. I'm able to capture from the camera and encode a video :)
Attachment 353096 [details] pushed as b9532fc - v4l2videoenc: Make sure min_buffers is valid