From ab65b9745b69cb36aefd0ecfe5bb1a7d5d733d97 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Mon, 12 Nov 2018 20:04:33 +0300 Subject: [PATCH] Repair V4L backend --- modules/videoio/src/videoio_registry.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/videoio/src/videoio_registry.cpp b/modules/videoio/src/videoio_registry.cpp index 84e96a4ca7..b5a5f7f1eb 100644 --- a/modules/videoio/src/videoio_registry.cpp +++ b/modules/videoio/src/videoio_registry.cpp @@ -84,6 +84,8 @@ static const struct VideoBackendInfo builtin_backends[] = DECLARE_BACKEND(CAP_V4L2, "V4L2", MODE_CAPTURE_ALL), #elif defined HAVE_CAMV4L DECLARE_BACKEND(CAP_V4L, "V4L", MODE_CAPTURE_ALL), +#elif defined HAVE_VIDEOIO + DECLARE_BACKEND(CAP_V4L, "V4L_BSD", MODE_CAPTURE_ALL), #endif @@ -433,6 +435,11 @@ void VideoCapture_create(CvCapture*& capture, Ptr& icap, VideoCap case CAP_GPHOTO2: TRY_OPEN(createGPhoto2Capture(index)); break; +#endif +#if defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO + case CAP_V4L: + TRY_OPEN_LEGACY(cvCreateCameraCapture_V4L(index)) + break; #endif case CAP_FIREWIRE: #ifdef HAVE_DC1394_2