I am trying to use video4linux2 that is shipped with android to display both camera inputs at the same time.
I tried using OVERLAY, or STREAMING to a buffer and renderind the buffer in an opengl texture.
I also tried using the "read" method to acquire data.
Overall I have the following issues:
- When using V4L2_BUF_TYPE_VIDEO_OVERLAY to setup the stream, I can open both cameras, but when starting the overlay for both, i get a blank image on both.
Also on the console I can see some message like: IPU_IRQ_PRP_VF_OUT_EOF
- When using V4L2_BUF_TYPE_VIDEO_CAPTURE and memory mapping some buffer, I can open both camera stream and capture both stream at the same time, but I get
ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued
On the second stream. I use different buffers for each inputs by doing:
mmap(NULL /* start anywhere */,
PROT_READ | PROT_WRITE /* required */,
MAP_SHARED /* recommended */,
For each device (i have a "device" structure containing the file descriptor and control data for each device)
- When reading from the file ( read(fd, buffer, length)), I get strange colors on the image, and I can not display camera 2 (/dev/video1).
For camera 2 I get the following error on the console
ERROR: v4l2 capture: mxc_v4l_read timeout counter 0
imx-ipuv3 imx-ipuv3.0: Not a CSI channel
Camera 1: /dev/video0
Camera 2: /dev/video1
Android 4.2.2_100 from freescale, engineering build
SABRESD board for imx6 (Quad) -> sabresd_6dq.
Using video4linux2 API to acquire camera images.