v4l2src (1.8.1) why requires downstream pool in userptr mode
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Aug 18 15:00:20 UTC 2016
Le 2016-08-12 11:09, "Jake Zhang" <zjpseudo at gmail.com> a écrit :
>
> I am tring to use userptr mode of v4l2src on my ARM board with below
pipeline but v4l2src is complaining no downstream pool is available. I am
wondering why v4l2src is not using the v4l2bufferpool but expect a
bufferpool from downstream.
In usrptr mode, v4l2src will not allocate memory, hence strictly depend on
downstream memory. While in mmap and dmabuf, v4l2src will allocate memory
and push it downstream.
>
> ------------------------------------------
> gst-launch-1.0 v4l2src num-buffers=1 io-mode=3 device=/dev/video0
do-timestamp=true ! 'video/x-raw, width=1280, height=720, framerate=30/1,
format=YUY2' ! videoconvert ! fakesink
> ------------------------------------------
> ======= more detailed error log ===============
> 0:00:00.651854958 4427 0x2325370 INFO v4l2
gstv4l2object.c:2776:gst_v4l2_object_setup_pool:<v4l2src0> accessing
buffers via mode 3
> 0:00:00.652293059 4427 0x2325370 INFO v4l2bufferpool
gstv4l2bufferpool.c:551:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src>
increasing minimum buffers to 2
> 0:00:00.652366954 4427 0x2325370 INFO v4l2bufferpool
gstv4l2bufferpool.c:564:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src>
reducing maximum buffers to 32
> 0:00:00.652373350 4427 0x2325370 INFO v4l2bufferpool
gstv4l2bufferpool.c:575:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src>
can't allocate, setting maximum to minimum
> 0:00:00.653270760 4427 0x2325370 WARN v4l2
gstv4l2object.c:3831:gst_v4l2_object_decide_allocation:<v4l2src0> decide
allocation
> 0:00:00.653294184 4427 0x2325370 WARN v4l2
gstv4l2object.c:3857:gst_v4l2_object_decide_allocation:<v4l2src0>
allocation: size:0 min:0 max:0 pool:(NULL)
> 0:00:00.653357210 4427 0x2325370 WARN v4l2
gstv4l2object.c:4087:gst_v4l2_object_decide_allocation:<v4l2src0> error: No
downstream pool to import from.
> 0:00:00.653365993 4427 0x2325370 WARN v4l2
gstv4l2object.c:4087:gst_v4l2_object_decide_allocation:<v4l2src0> error:
When importing DMABUF or USERPTR, we need a pool to import from
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: No
downstream pool to import from.
> =============================================
>
>
> To make v4l2src happy, I add a 'videomedian' element which has a
bufferpool and now I can see v4l2src is using downstream buffer pool but it
can not request the buffer. If I swtich to DMABUF mode and hack the v4l2src
to force it use downstream pool, it will be no issue of requesting buffer.
> I must have missed something about how to use userptr mode in v4l2src,
could anyone provide some input here? Thanks
> ------------------------------
> gst-launch-1.0 v4l2src num-buffers=1 io-mode=3 device=/dev/video0
do-timestamp=true ! 'video/x-raw, width=1280, height=720, framerate=30/1' !
videoconvert ! videomedian ! fakesink
> ------------------------
> ======= more detailed error log by adding videomedian ===============
> 0:00:00.677143473 5218 0xa88230 ERROR v4l2allocator
gstv4l2allocator.c:738:gst_v4l2_allocator_start:<v4l2src0:pool:src:allocator>
error requesting 2 buffers: Invalid argument
> 0:00:00.677153347 5218 0xa88230 ERROR v4l2bufferpool
gstv4l2bufferpool.c:848:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> we
received 0 buffer from device '/dev/video0', we want at least 2
> 0:00:00.677271601 5218 0xa88230 WARN v4l2src
gstv4l2src.c:511:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to
allocate required memory.
> 0:00:00.677278901 5218 0xa88230 WARN v4l2src
gstv4l2src.c:511:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer
pool activation failed
>
>
>
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160818/c16b2c60/attachment.html>
More information about the gstreamer-devel
mailing list