You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OV5640相机GStreamer管道内存分配失败问题排查求助

在Yocto环境下OV5640搭配GStreamer管道出现“Failed to allocate required memory”错误求助

在Yocto环境中使用OV5640相机运行GStreamer管道时,反复遇到Failed to allocate required memory错误。已尝试调整管道内元素、查阅GStreamer相关源码,但问题仍未解决。

以下是完整错误日志:

0:00:01.000589819 162808 0xaaaac424cc00 INFO              GST_STATES gstbin.c:2955:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 4(PLAYING) successfully
New clock: GstSystemClock
0:00:01.003297803 162808 0xaaaac42e3630 ERROR                v4l2src gstv4l2src.c:475:gst_v4l2src_get_input_size_info:<v4l2src0> Cropcap fail, CROPCAP has not supported
0:00:01.004017340 162808 0xaaaac42e3630 INFO               GST_EVENT gstevent.c:820:gst_event_new_caps: creating caps event video/x-raw, width=(int)3840, height=(int)2160, framerate=(fraction)120/1, format=(string)YUY2, colorimetry=(string)1:4:7:1, interlace-mode=(string)progressive
0:00:01.007502702 162808 0xaaaac42e3630 INFO           basetransform gstbasetransform.c:1317:gst_base_transform_setcaps:<videoconvert0> reuse caps
0:00:01.008158637 162808 0xaaaac42e3630 INFO               GST_EVENT gstevent.c:820:gst_event_new_caps: creating caps event video/x-raw, width=(int)3840, height=(int)2160, framerate=(fraction)120/1, format=(string)YUY2, colorimetry=(string)1:4:7:1, interlace-mode=(string)progressive
0:00:01.009526909 162808 0xaaaac42e3630 INFO                    v4l2 gstv4l2object.c:2990:gst_v4l2_object_setup_pool:<v4l2src0:src> accessing buffers via mode 4
0:00:01.010253047 162808 0xaaaac42e3630 INFO          v4l2bufferpool gstv4l2bufferpool.c:567:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
0:00:01.010323128 162808 0xaaaac42e3630 INFO          v4l2bufferpool gstv4l2bufferpool.c:574:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 4
0:00:01.010361289 162808 0xaaaac42e3630 INFO          v4l2bufferpool gstv4l2bufferpool.c:580:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:01.010532053 162808 0xaaaac42e3630 INFO                    v4l2 gstv4l2object.c:4532:gst_v4l2_object_decide_allocation:<v4l2src0> Number of buffer allocated 6
0:00:01.010628415 162808 0xaaaac42e3630 INFO          v4l2bufferpool gstv4l2bufferpool.c:580:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:01.376023465 162808 0xaaaac42e3630 ERROR         v4l2bufferpool gstv4l2bufferpool.c:689:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src> error with STREAMON 32 (Broken pipe)
0:00:01.376098587 162808 0xaaaac42e3630 ERROR             bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<v4l2src0:pool:src> start failed
0:00:01.376145148 162808 0xaaaac42e3630 WARN                 v4l2src gstv4l2src.c:792:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
0:00:01.376169869 162808 0xaaaac42e3630 WARN                 v4l2src gstv4l2src.c:792:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
0:00:01.376219910 162808 0xaaaac42e3630 INFO        GST_ERROR_SYSTEM gstelement.c:2154:gst_element_message_full_with_details:<v4l2src0> posting message: Failed to allocate required memory.
0:00:01.376362353 162808 0xaaaac42e3630 INFO        GST_ERROR_SYSTEM gstelement.c:2181:gst_element_message_full_with_details:<v4l2src0> posted error message: Failed to allocate required memory.
0:00:01.376398474 162808 0xaaaac42e3630 WARN                 basesrc gstbasesrc.c:3292:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
0:00:01.376462676 162808 0xaaaac42e3630 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:01.376487516 162808 0xaaaac42e3630 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
0:00:01.376539117 162808 0xaaaac42e3630 INFO        GST_ERROR_SYSTEM gstelement.c:2154:gst_element_message_full_with_details:<v4l2src0> posting message: Internal data stream error.
0:00:01.376597679 162808 0xaaaac42e3630 INFO        GST_ERROR_SYSTEM gstelement.c:2181:gst_element_message_full_with_details:<v4l2src0> posted error message: Internal data stream error.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.

恳请技术同行帮忙分析该问题的成因,并提供可行的解决方法。

内容的提问来源于stack exchange,提问作者Ankit Chauhan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 07:23:12