i have modified the mt9t001.c ccdc_dm355.c dm355_vpfe.c files and other related files to support MT9P031
but when calling VIDIOC_DQBUF the App block at schedule() ,however VIDIOC_QBUF is OK and the device is
opend as O_NONBLOCK.
if(!init_flag){
CLEAR(buf);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
init_flag = 1;
}else {
/* requeue the buffer */
if (-1 == ioctl(fdCapture, VIDIOC_QBUF, &buf)) {
perror("StartCameraCaputre:ioctl:VIDIOC_QBUF");
}
}
/*determine ready buffer */
if (-1 == ioctl(fdCapture, VIDIOC_DQBUF, &buf)) { // blocked here
if (EAGAIN == errno)
return ;
perror("StartCameraCaputre:ioctl:VIDIOC_DQBUF");
exit_s();
}
if ((fdCapture =
open(CAPTURE_DEVICE, O_RDWR | O_NONBLOCK, 0)) <= -1) { // Open NONBLOCK method
perror("InitDevice:open::");
exit_s();
} else
printf("\nOpen Done\n");
somebody tell me please !!! Why it blocked . code resources are all form leopard
the app source: https://www.leopardimaging.com/uploads/DM355_ipipe_example_DVSDK_1.30_v1.32.tgz
the kernel source:https://www.leopardimaging.com/uploads/patches.tgz