AnsweredAssumed Answered

imx6 simultaneous overlay and capture?

Question asked by Pasi Ojala on Nov 30, 2016
Latest reply on Dec 9, 2016 by Pasi Ojala

Hi all,
I'm trying to make overlay and capture work simultaneously on sabreDL board (will be moving on to the solo processor later on). I tried searching the forums, but couldn't really find a definitive answer to "is it possible at all to overlay and capture at the same time?"

 

What I basically try do is

initMyOverlayAndCapture();
overlay=1;
ioctl(fd_v4l, VIDIOC_OVERLAY, &overlay);
while (1){
 xioctl(fd_capture, VIDIOC_DQBUF, &buf);
 handleTheDataInMyBuffer(); //takes anything between 5 to 500 ms
 xioctl(fd_capture, VIDIOC_QBUF, &buf);

}

i.e I'd like to see the overlay work smoothly while I'm picking up samples from the camera and processing them. However, when done like this, I don't get any proper data in my buffer. If I never actually start the overlay with the ioctl line, data flows nicely to my buffer, so the basic pieces are working (but not together).

 

If I do something like

initMyOverlayAndCapture();
while (1){
 usleep(200*1000);
 overlay=0;
 ioctl(fd_v4l, VIDIOC_OVERLAY, &overlay);
 xioctl(fd_capture, VIDIOC_DQBUF, &buf);
 handleTheDataInMyBuffer(); //takes anything between 5 to 500 ms
 xioctl(fd_capture, VIDIOC_QBUF, &buf);
 overlay=1;
 ioctl(fd_v4l, VIDIOC_OVERLAY, &overlay);
}

I get moments of overlay, as expected, and proper data in between from the camera... but this doesn't quite fulfill the "smoothly" requirement I have.

BR,
Pasi

Outcomes