<p dir="ltr"></p>
<p dir="ltr">Le 19 août 2016 8:56 AM, "Jake Zhang" <<a href="mailto:zjpseudo@gmail.com">zjpseudo@gmail.com</a>> a écrit :<br>
><br>
> Thanks Nicolas. My issue of using videomeidian bufferpool is due to libv4l2 which somehow is causing ioctl failed. <br>
> Disabling libv4l2 and using ioctl directly make the issue go away. </p>
<p dir="ltr">Thanks for the update. Indeed, libv4l2 have several issues regarding this.</p>
<p dir="ltr">Nicolas</p>
<p dir="ltr">><br>
> On Thu, Aug 18, 2016 at 11:00 AM, Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<br>
>><br>
>><br>
>> Le 2016-08-12 11:09, "Jake Zhang" <<a href="mailto:zjpseudo@gmail.com">zjpseudo@gmail.com</a>> a écrit :<br>
>> ><br>
>> > 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.<br>
>><br>
>> 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.<br>
>><br>
>> ><br>
>> > ------------------------------------------<br>
>> > 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 <br>
>> > ------------------------------------------<br>
>> > ======= more detailed error log ===============<br>
>> > 0:00:00.651854958 4427 0x2325370 INFO v4l2 gstv4l2object.c:2776:gst_v4l2_object_setup_pool:<v4l2src0> accessing buffers via mode 3<br>
>> > 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<br>
>> > 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<br>
>> > 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<br>
>> > 0:00:00.653270760 4427 0x2325370 WARN v4l2 gstv4l2object.c:3831:gst_v4l2_object_decide_allocation:<v4l2src0> decide allocation<br>
>> > 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)<br>
>> > 0:00:00.653357210 4427 0x2325370 WARN v4l2 gstv4l2object.c:4087:gst_v4l2_object_decide_allocation:<v4l2src0> error: No downstream pool to import from.<br>
>> > 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<br>
>> > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: No downstream pool to import from.<br>
>> > =============================================<br>
>> ><br>
>> ><br>
>> > 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. <br>
>> > I must have missed something about how to use userptr mode in v4l2src, could anyone provide some input here? Thanks<br>
>> > ------------------------------<br>
>> > 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 <br>
>> > ------------------------<br>
>> > ======= more detailed error log by adding videomedian ===============<br>
>> > 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<br>
>> > 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<br>
>> > 0:00:00.677271601 5218 0xa88230 WARN v4l2src gstv4l2src.c:511:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.<br>
>> > 0:00:00.677278901 5218 0xa88230 WARN v4l2src gstv4l2src.c:511:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > gstreamer-devel mailing list<br>
>> > <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
>> > <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
>> ><br>
>><br>
>><br>
>> _______________________________________________<br>
>> gstreamer-devel mailing list<br>
>> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
></p>