After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783361 - v4l2h264enc: Sink buffer pool activation fails
v4l2h264enc: Sink buffer pool activation fails
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.12.0
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-02 15:52 UTC by Todor Tomov
Modified: 2017-06-05 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer output log (71.02 KB, text/plain)
2017-06-02 15:52 UTC, Todor Tomov
  Details
v4l2 log (41.59 KB, text/plain)
2017-06-02 15:52 UTC, Todor Tomov
  Details
v4l2videoenc: Make sure min_buffers is valid (1.39 KB, patch)
2017-06-02 18:05 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Todor Tomov 2017-06-02 15:52:07 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.
Comment 1 Todor Tomov 2017-06-02 15:52:48 UTC
Created attachment 353094 [details]
v4l2 log
Comment 2 Nicolas Dufresne (ndufresne) 2017-06-02 18:05:47 UTC
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.
Comment 3 Todor Tomov 2017-06-05 13:57:52 UTC
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 :)
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-05 14:58:45 UTC
Attachment 353096 [details] pushed as b9532fc - v4l2videoenc: Make sure min_buffers is valid