Hi community,
Our partner have a question about i.MX6S V4L2 driver of L3.0.35_4.1.0 BSP.
They understand the timing that V4L2 driver receive data as following.
=====
A buffer which is enqueued to driver by VIDIOC_QBUF have two status.
These are V4L2_BUF_FLAG_QUEUED and V4L2_BUF_FLAG_DONE.
And it will be able to be dequeued (be able to write a next data to input buffer which was enqueued in previous step) when V4L2_BUF_FLAG_DONE sutatus.
=====
However, according to the source code (comment around line 743 in drivers/media/video/mxc/output/mxc_vout.c), the first buffer can be dequeued after 3 buffers is enqueued if input buffer size = output buffer size.
In this case, can our partner check whether the next data can be written to the first buffer before the 3rd buffer is enqueued?
Best Regards,
Satoshi Shimoda
已解决! 转到解答。
Hi Satoshi-san
Never try it but If you check the V4L2_BUF_FLAG_PREPARED in user space, The buffer has been prepared for I/O and can be queued by the application. Drivers set or clear this flag when the VIDIOC_QUERYBUF, VIDIOC_PREPARE_BUF, VIDIOC_QBUF or VIDIOC_DQBUF ioctl is called. I do not see any other way to do what your costumer is trying to do.
Hope this helps
Hi Satoshi-san
Never try it but If you check the V4L2_BUF_FLAG_PREPARED in user space, The buffer has been prepared for I/O and can be queued by the application. Drivers set or clear this flag when the VIDIOC_QUERYBUF, VIDIOC_PREPARE_BUF, VIDIOC_QBUF or VIDIOC_DQBUF ioctl is called. I do not see any other way to do what your costumer is trying to do.
Hope this helps