1 | initial version |
CvQueryFrame is blocking function. It blocks thread until frame from camera will be ready. If there is some problem with camera, it leads to deadlock. There is some C samples that uses old OpenCV 1.x API and video camera, i.e. samples/c/fback_c.c. You can use it as base for your code.