libv4l defaults to obsolete API if no libv4l1 detected (Bug #4471)
Description
libv4l1 hasn't been included in distros for some time. In cmake/OpenCVFindLibsVideo.cmake there's the block of code:
# --- V4L --- ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO) if(WITH_V4L) if(WITH_LIBV4L) CHECK_MODULE(libv4l1 HAVE_LIBV4L1) CHECK_MODULE(libv4l2 HAVE_LIBV4L2) if(HAVE_LIBV4L1 AND HAVE_LIBV4L2) set(HAVE_LIBV4L YES)
Please omit libv4l1 from this check, it's not necessary. The other plugin chosen in this case can't set FPS and crashes on multiple launches.
# --- V4L --- ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO) if(WITH_V4L) if(WITH_LIBV4L) CHECK_MODULE(libv4l2 HAVE_LIBV4L2) if(HAVE_LIBV4L2) set(HAVE_LIBV4L YES)
History
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/5064