Commit 6c524e84 authored by Simmo Saan's avatar Simmo Saan

Allow V4L, V4L2 to be used as preferred capture API

parent c47267ef
...@@ -186,11 +186,11 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index) ...@@ -186,11 +186,11 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
#ifdef HAVE_VFW #ifdef HAVE_VFW
TRY_OPEN(capture, cvCreateCameraCapture_VFW(index)) TRY_OPEN(capture, cvCreateCameraCapture_VFW(index))
#endif #endif
if (pref) break; // CV_CAP_VFW
#if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO #if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
TRY_OPEN(capture, cvCreateCameraCapture_V4L(index)) TRY_OPEN(capture, cvCreateCameraCapture_V4L(index))
#endif #endif
if (pref) break; // CV_CAP_VFW
#ifdef HAVE_GSTREAMER #ifdef HAVE_GSTREAMER
TRY_OPEN(capture, cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L2, reinterpret_cast<char *>(index))) TRY_OPEN(capture, cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L2, reinterpret_cast<char *>(index)))
...@@ -302,15 +302,15 @@ CV_IMPL CvCapture * cvCreateFileCaptureWithPreference (const char * filename, in ...@@ -302,15 +302,15 @@ CV_IMPL CvCapture * cvCreateFileCaptureWithPreference (const char * filename, in
if (apiPreference) break; if (apiPreference) break;
#endif #endif
#ifdef HAVE_VFW
case CV_CAP_VFW: case CV_CAP_VFW:
#ifdef HAVE_VFW
TRY_OPEN(result, cvCreateFileCapture_VFW (filename)) TRY_OPEN(result, cvCreateFileCapture_VFW (filename))
if (apiPreference) break;
#endif #endif
#if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO #if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
TRY_OPEN(result, cvCreateCameraCapture_V4L(filename)) TRY_OPEN(result, cvCreateCameraCapture_V4L(filename))
if (apiPreference) break;
#endif #endif
if (apiPreference) break;
case CV_CAP_MSMF: case CV_CAP_MSMF:
#ifdef HAVE_MSMF #ifdef HAVE_MSMF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment