iMX6 v4l2 capture 2 buffers queue

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX6 v4l2 capture 2 buffers queue

790 Views
edison_fernande
Contributor III

Hi,

I have an application where I have my camera configured with a long exposure and I need to capture one frame and analize it to detect a certain event.

My problem is that, due to the minimum 2 buffers queue that v4l has, when I dqueue a buffer, I get the oldest in the queue and given the long exposure it is too old for the application as I need the frame to be as close as possible to the time I try to dqueue it so my question is.

Is there a way of avoiding this minimum 2 buffers queue? This is, queuing one buffer only.

If not, is there a way of dqueuing the newest buffer in the queue?

Any help will be appreciated.

Regards,

Edison

Tags (3)
0 Kudos
1 Reply

361 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Edison

drivers are based on V4L2 Linux standard API specification available at
v4l2spec.bytesex.org/spec and described in Chapter 9 Video for Linux Two (V4L2) Driver

attached Linux Manual. One can check sources in  linux/drivers/media/platform/mxc, in particular
mxc_v4l_dqueue() in mxc_v4l2_capture.c

and queue ioctl descriptions on
https://www.linuxtv.org/downloads/v4l-dvb-apis-old/vidioc-qbuf.html

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos