repaired gstreamer camera capture:
1. Enabled property retrieval: height, width, FPS 2. Fixed issue when isOpened returns always true even for non-existing devices 3. Ability to work with non-0 device. Camera capture index is taken into account
This commit is contained in:
@@ -238,10 +238,12 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
capture = cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L2, 0);
|
||||
capture = cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L2,
|
||||
reinterpret_cast<char *>(index));
|
||||
if (capture)
|
||||
return capture;
|
||||
capture = cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L, 0);
|
||||
capture = cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L,
|
||||
reinterpret_cast<char *>(index));
|
||||
if (capture)
|
||||
return capture;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user